hey all,
I found this class below online. it works great for what i need, but I want to make the text unselectable. I know normally you add "Field.NON_FOCUSABLE" as one of the parameters to a richtextfield to make that work... but not sure what to do if it's a custom one like below.
Thanks in advance!!
Code:
class SectionHeader extends RichTextField {
int mTextColor;
int mBgColor;
public SectionHeader(String text, int bgColor, int textColor) {
super(text);
mTextColor = textColor;
mBgColor = bgColor;
}
protected void paint(Graphics graphics) {
graphics.clear();
graphics.setColor(mBgColor);
graphics.fillRect(0, 0, getWidth(), getHeight());
graphics.setColor(mTextColor);
super.paint(graphics);
}
}