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
New Developer
braja
Posts: 11
Registered: ‎12-24-2009
Accepted Solution

RichTextField text truncation or ellipsis

Hi I'm new to BB Java dev and I'm trying to truncate the text of a non-focusable RichTextField. Is this possible?

 

I've tried the following with no success:

 

...
RichTextField _myRTF = new RichTextField(my_text, off, attrs, fonts, (DrawStyle.ELLIPSIS | RichTextField.FIELD_LEFT | RichTextField.NON_FOCUSABLE | RichTextField.NO_NEWLINE)) { ... };
...

 

I've also tried using Labelfield.ELLIPSIS with no luck. It works for LabelField but I have to use RichTextField because I'm using different font styles.

 

 

Please use plain text.
New Developer
braja
Posts: 11
Registered: ‎12-24-2009

Re: RichTextField text truncation or ellipsis

[ Edited ]

I ended up using LabelField instead with LabelField.ELLIPSIS, overiding the paint method and setting the font in there.

 

 

Please use plain text.