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
Super Contributor
Posts: 273
Registered: ‎11-23-2010
My Device: 9800 torch
My Carrier: Software Programmer

How can i draw Text like some words are in bold and some words are in plain.

Hi There,

 

Can anyone please suggest me on this like:

 

Ramu has a good boy.

 

like this how can i draw this text in a field.

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: How can i draw Text like some words are in bold and some words are in plain.

Super Contributor
Posts: 273
Registered: ‎11-23-2010
My Device: 9800 torch
My Carrier: Software Programmer

Re: How can i draw Text like some words are in bold and some words are in plain.

[ Edited ]

Hi peter,

 

actually i am overriding the Field class to designs a different componenet that contains an image and the text i metioned and some other data etc.. is it possible to draw that text is there any algorithm or any default classes will be there to do like that. and the field is focusable.

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: How can i draw Text like some words are in bold and some words are in plain.

I am not aware of any easy way to achieve what you want using your own class.  You are going to have to write a load of code to enable selection and focus, correct cursor movement and the like.

 

Personally I would not have a single Field that contains both an image and text the way you want.  You may be able to achieve the effect you want using a Manager and a real RichTextField and my guess is that would be much easier, but that depends on exactly what you want to achieve.