BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 09-10-2007, 09:20 AM   #1 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: India
Model: 8700g
Carrier: Airtel
Posts: 117
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Problem about ObjectChoiceField

Please Login to Remove!

In my apllication i have number of ObjectChoiceFields.I have also set font for my application.
The only problem is the display of the list of ObjectChoiceFields.As u can c in the snapshot,the list contents ore not displayed properly.Can the font of the list be changed so that the contents of the list can be displayed properly.
Attached Images
File Type: png 8100-01.png (6.0 KB, 24 views)
__________________
Thanks
Meenal
Offline  
Old 09-10-2007, 11:11 PM   #2 (permalink)
Thumbs Must Hurt
 
Join Date: Jun 2007
Location: Bangladesh
Model: 8800
PIN: N/A
Carrier: EDGE
Posts: 93
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Meenal,

You can set Font for ObjectChoiceField using paint method. Here is a sample code to set Font for ObjectChoiceField:

Code:
ObjectChoiceField myChoice = new ObjectChoiceField( "Select: ", 
	new String[] { "No", "Yes" } ) {
	
	public void paint(Graphics graphics) {                
		graphics.setFont(...);
		super.paint(graphics);
	}
};
Try with the code and let me know if your problem still exist.

Cheers,
ARIF
Offline  
Old 09-11-2007, 12:47 AM   #3 (permalink)
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: India
Model: 8700g
Carrier: Airtel
Posts: 117
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

what u suggested did not help, so i changed the system font and now its looking better.But i wish there was some way to do it programatically.
__________________
Thanks
Meenal
Offline  
Old 09-11-2007, 01:10 PM   #4 (permalink)
Thumbs Must Hurt
 
Join Date: Jul 2007
Model: 8800
PIN: N/A
Carrier: TDC
Posts: 115
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Meenal View Post
Hi,

what u suggested did not help, so i changed the system font and now its looking better.But i wish there was some way to do it programatically.
there is my friend.... U could make a class extending the ObjectChoiceField and simply override the paint class where u set the font to whatever you please.

If its not to clear i will provide you with a similar example i made myself tomorrow

Last edited by genvej : 09-11-2007 at 01:11 PM.
Offline  
Old 09-11-2007, 10:59 PM   #5 (permalink)
Thumbs Must Hurt
 
Join Date: Jun 2007
Location: Bangladesh
Model: 8800
PIN: N/A
Carrier: EDGE
Posts: 93
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Meenal,

Quote:
Originally Posted by Meenal View Post
Hi,

what u suggested did not help, so i changed the system font and now its looking better.But i wish there was some way to do it programatically.
Try with the following code:
Code:
ObjectChoiceField myChoice = new ObjectChoiceField( "Select: ", 
	new String[] { "No", "Yes" } ) {
	
	public void paint(Graphics graphics) {                
		setFont(...);
		super.paint(graphics);
	}
};
Here i've called the setFont() method of ObjectChoiceField class, not for Graphics class. Hope this will Help!

Cheers,
ARIF
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

NEW SIEMENS 8WD4340-0CC GREEN STROBE LIGHT 115V
$100.0
NEW SIEMENS 8WD4340-0CC GREEN STROBE LIGHT 115V  pictureSIEMENS JXD JXD6-ETI JXD63L400 3 POLE 400 AMP 600V SENTRON CIRCUIT BREAKER ITE
$250.0
SIEMENS JXD JXD6-ETI JXD63L400 3 POLE 400 AMP 600V SENTRON CIRCUIT BREAKER ITE pictureUsed 1Pcs 6Ra2 221-8Dd20-1 6Ra2221-8Dd20-1 Siemens Plc Module G
$1087.99
Used 1Pcs 6Ra2 221-8Dd20-1 6Ra2221-8Dd20-1 Siemens Plc Module G picture1Pcs Used Siemens 6Es7413-2Xg02-0Ab0 Plc Module F
$5281.99
1Pcs Used Siemens 6Es7413-2Xg02-0Ab0 Plc Module F pictureSiemens Circuit Breaker, G4A, 240-415vac
$7.5
Siemens Circuit Breaker, G4A, 240-415vac picture






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