BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 01-24-2008, 10:44 PM   #1
BB1364
Thumbs Must Hurt
 
Join Date: Oct 2007
Model: 7100i
PIN: N/A
Carrier: Dont know
Posts: 195
Default Problem Setting Font Size

Please Login to Remove!

hi

i hv set the default font of a application as :

Code:
 FontFamily fontFamily[] = FontFamily.getFontFamilies();
 Font font = fontFamily[5].getFont(FontFamily.SCALABLE_FONT,11);
 Font.setDefaultFont(font);
But after setting this i wanted to change the font size of some of the labels and i did it as follows:
Code:
Font font1 = fontFamily[5].getFont(FontFamily.SCALABLE_FONT,11);
        font1.derive(Font.UNDERLINED);
        LabelField lt2 = new LabelField("Enjoy ur Holiday ");
        lt2.setFont(font1);
Now, the lt2 label does not show the current font font1, it always shows the default font.

Does anyone know wat mistake i hv done here. plz tell me.


Thanks in advance
Offline  
Old 01-25-2008, 09:28 AM   #2
sn0wshrew
Knows Where the Search Button Is
 
Join Date: Sep 2007
Model: 8830
PIN: N/A
Carrier: Verizon
Posts: 24
Default

Font.derive(...) returns a new Font object that is the derived font - it does not change font1.
Offline  
Closed Thread



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


MOSFET - IRFZ44N 55V - Transistor  for Arduino Pi  TTL picture

MOSFET - IRFZ44N 55V - Transistor for Arduino Pi TTL

$54.79



MOSFET - IRF540N 100V 33A - Transistor for Arduino Pi TT picture

MOSFET - IRF540N 100V 33A - Transistor for Arduino Pi TT

$49.72



PNP NPN Power Transistor Assortment Kit 840pcs 24 Types Electronic Component picture

PNP NPN Power Transistor Assortment Kit 840pcs 24 Types Electronic Component

$24.21



2SA733-Q Original New NEC TO-92 Transistor picture

2SA733-Q Original New NEC TO-92 Transistor

$10.95



2SC2240 / TRANSISTOR / TO92 / 4 PIECES (qzty) picture

2SC2240 / TRANSISTOR / TO92 / 4 PIECES (qzty)

$7.99



2SC2023 Original New Sanken Transistor C2023 picture

2SC2023 Original New Sanken Transistor C2023

$13.95







Copyright © 2004-2016 BlackBerryForums.com.
The names RIM © and BlackBerry © are registered Trademarks of BlackBerry Inc.