Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
bikas
Posts: 984
Registered: ‎02-10-2009
My Device: Not Specified

Re: Cursor gone in black ActiveRichTextField

 I think using this will solve your cursor disappear related problem.

 

Regards

Bikas

Please use plain text.
New Developer
MourningWood
Posts: 15
Registered: ‎11-08-2008
My Device: 8330 Curve

Re: Cursor gone in black ActiveRichTextField

OK, I've gotten a little further with it but came across another bump in the road.  I added a onFucos and unFocus listenter to the fields so that you will know when it is selected and it looks beutiful except with the phone number.  It will not change the font, it keeps putting it as the standard font.  Before I split it into multiple fields it would resize the number fine but with the number in its own field it will not.

 

Here is an example of my code

 

ActiveRichTextField Num1 = new ActiveRichTextField("555-555-5555") { public void paint(Graphics g) { g.setBackgroundColor(c1); g.setColor(c2); g.clear(); super.paint(g); } protected void onFocus(int direction) { c1 = Color.SILVER; c2 = Color.BLACK; invalidate(); } protected void onUnfocus() { c1 = Color.BLACK; c2 = Color.SILVER; invalidate(); } }; Num1.setFont(FieldFont);

 Any ideas?

 

 

Please use plain text.
New Developer
MourningWood
Posts: 15
Registered: ‎11-08-2008
My Device: 8330 Curve

Re: Cursor gone in black ActiveRichTextField

Figured that part out, I just set the font in the contructor of the class.

 

 

Font.setDefaultFont(FieldFont);

 

 

 

Please use plain text.