BlackBerry Forums Support Community
              

Closed Thread
 
Thread Tools
Old 01-05-2007, 02:49 AM   #1
Ananthasivan V K
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: Ernakulam, Kerala, India
Model: 8320
Carrier: Airtel
Posts: 65
Question Java net.rim.device.api.ui.Graphics's method setBackgroundColor not working !

Please Login to Remove!

Hai Everyone

I had a problem while trying to set the background color of a custom button field using the
net.rim.device.api.ui.Graphics class's method setBackgroundColor(int RGB).The background color is not changing.

Now I'm using the fillRect(int x, int y, int width, int height) function to accomplish this, it's slow downs the performance.

I need to know how the setBackgroundColor(int RGB) could be used with properly working.Please let me know @ earliest how this could be fixed ?

Thanks In Advance.
Offline  
Old 01-05-2007, 07:01 AM   #2
adwiv
Thumbs Must Hurt
 
Join Date: Oct 2006
Model: 8707g
Carrier: Hutch
Posts: 73
Default

You need to call graphics.clear() after doing the setBackgroundColor
Offline  
Old 01-05-2007, 07:26 AM   #3
Ananthasivan V K
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: Ernakulam, Kerala, India
Model: 8320
Carrier: Airtel
Posts: 65
Exclamation Hai

I added the graphics.clear(); but it has no effect.
By the time,One more Information.
I am trying to change the background color of a field(custom button field)
that is set as title
...

Please reply if you know how to resolve this issue.
Thanks again.
Offline  
Old 01-05-2007, 08:43 AM   #4
adwiv
Thumbs Must Hurt
 
Join Date: Oct 2006
Model: 8707g
Carrier: Hutch
Posts: 73
Default

You are trying to set a button field as title? Of a screen? I did't get it.

Please note that you background settings will not work properly if you use MainScreen class.
maybe of some use:
http://www.blackberryforums.com/deve...-problems.html
Offline  
Old 01-11-2007, 12:11 AM   #5
Ananthasivan V K
Thumbs Must Hurt
 
Join Date: Jan 2007
Location: Ernakulam, Kerala, India
Model: 8320
Carrier: Airtel
Posts: 65
Thumbs up Thanks Adwiv

I am trying to add a buttonfield to the titlebar, the background can't be changed at the titlebar.

Thanks for the information adwiv.

Now I made a change, Now it is added to the screen instead of to the titlebar and the bacground changes are now working properly.

Thanks
Anand
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


2PC Camshaft Timing Solenoid Valve For 04-10 Ford F-150 Expedition 4.6L 5.4L VCT picture

2PC Camshaft Timing Solenoid Valve For 04-10 Ford F-150 Expedition 4.6L 5.4L VCT

$47.59



Cole Hersee (24059-BP) 12V Insulated SPST Continuous Duty Solenoid picture

Cole Hersee (24059-BP) 12V Insulated SPST Continuous Duty Solenoid

$30.31



Fuel Shut Off Solenoid Fit For Kubota D905 D1005 D1105 17208-60010 17208-60015 picture

Fuel Shut Off Solenoid Fit For Kubota D905 D1005 D1105 17208-60010 17208-60015

$25.25



15471-60010 Fuel Shutoff Solenoid Compatible With Kubota L2250 L2650 L3010 L35  picture

15471-60010 Fuel Shutoff Solenoid Compatible With Kubota L2250 L2650 L3010 L35

$32.99



SA-3786-12 603350 Fuel Shutoff Solenoid Kubota Compatible 721D2 21HP Grasshopper picture

SA-3786-12 603350 Fuel Shutoff Solenoid Kubota Compatible 721D2 21HP Grasshopper

$29.29



Fuel Shutoff Solenoid 26420469 for Perkins 900 1000 1004 1006 1103C 1104A 1104C picture

Fuel Shutoff Solenoid 26420469 for Perkins 900 1000 1004 1006 1103C 1104A 1104C

$18.59







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