11-02-2009 11:18 PM
Hi all,
Does anyone know how to implement the display of special text formats ( subscript, superscript, italic subscript, etc.) on list field?
Thanks and best regards.
11-02-2009 11:34 PM
import net.rim.device.api.ui*;
...
Font f = this.getFont(); [Your listField].setFont(f.derive(Font.ITALIC, f.getHeight(), Ui.UNITS_px));
The above will use the current screen's font but in italics. You could specify other styles or sizes.
Check out the API for the OS version you are developing for and look up the Font class. It has all the info to setup a new font.
The 4.5 API is here: http://www.blackberry.com/developers/docs/4.5.0api
11-03-2009 12:09 AM - last edited on 11-03-2009 12:09 AM
Thank erinliisa, but follow your solution i just can use font style for specify field on list. (i think)
I mean if there are special characters (superscript, subscript etc.) in random field on my list, then it will be displayed exactly.
Anyway, thank you again.
My writing skill is really really bad ![]()
11-03-2009 12:50 AM
If you are referring to a listfield or a keywordlistfield and you want to have different styles of font within one list element, I would suggest overriding the listfield's drawListRow() method and drawing the text where you want it in the style you want.
11-03-2009 02:58 AM
some1 plz help