BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 01-24-2008, 10:44 PM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Oct 2007
Model: 7100i
PIN: N/A
Carrier: Dont know
Posts: 195
Post Thanks: 0
Thanked 0 Times in 0 Posts
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 (permalink)
Knows Where the Search Button Is
 
Join Date: Sep 2007
Model: 8830
PIN: N/A
Carrier: Verizon
Posts: 24
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

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


Thread Tools

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

100Pcs 60V 1A Schottky Diode Sb160 New Ic D
$4.8
100Pcs 60V 1A Schottky Diode Sb160 New Ic D pictureEZM328 Multi-functional 128*64 LCD Transistor Tester Diode ESR MOS Meter X7M3
$15.66
EZM328 Multi-functional 128*64 LCD Transistor Tester Diode ESR MOS Meter X7M3 picture10 x X0405MF 1AA2 Thyristor: SCR 600V/4A (RMS) Gate Trigger Current 50uA
$9.99
10 x X0405MF 1AA2 Thyristor: SCR 600V/4A (RMS) Gate Trigger Current 50uA  picture2Pcs Cd4067be Ti Mux/Demux 1X16 24Dip Ic New D
$2.26
2Pcs Cd4067be Ti Mux/Demux 1X16 24Dip Ic New D pictureMCR100L-8-AB-T92-B Thyristor: SCR 600V/0.8A (RMS),Reverse Blocking Gate Trigger
$6.99
MCR100L-8-AB-T92-B Thyristor: SCR 600V/0.8A (RMS),Reverse Blocking Gate Trigger picture






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