Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 98
Registered: ‎12-29-2009
My Device: Bold
My Carrier: Rogers
Accepted Solution

SeparatorField--Color?

Hi,

 

I've been trying to alter the color of a SeparatorField that I have added to my application (it looks as though some applications out there have managed to change the color of the SeparatorField).

 

But, the following code does not seem to work for me:

 

 

SeparatorField sepfield = new SeparatorField(){
								protected void Paint(Graphics g){									   
     g.setBackgroundColor(Color.RED);						   
     g.clear();									
     super.paint(g);
}
};

 I checked out this posting http://supportforums.blackberry.com/t5/Java-Development/separator-in-Screen/m-p/272491#M45499 and it looks like I'm doing to the same thing as bitkas suggested.

 

Any ideas?

 

Developer
Posts: 587
Registered: ‎01-19-2010
My Device: BOLD 9700 OS5.0.0.x on Rogers Canada
My Carrier: Rogers

Re: SeparatorField--Color?

Is there a setForegroundColor method? If yes, I would suggest trying that. If no, well, what do I know? XD

----------------------------------------------------------------------------
chown -R us ./base
~J!NX
Developer
Posts: 17,026
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: SeparatorField--Color?

setColor

----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
Posts: 98
Registered: ‎12-29-2009
My Device: Bold
My Carrier: Rogers

Re: SeparatorField--Color?

I tried "setColor" but no change.

 

I'll setup a text program when I get home tonight to rule out any other piece of code that might be doing something.

 

I'll let you know what shakes out.

 

Developer
Posts: 98
Registered: ‎12-29-2009
My Device: Bold
My Carrier: Rogers

Re: SeparatorField--Color?

Strange, I tried both 'setColor" and "setBackground" and neither method changes the color of the separator field.

 

Any other suggestions?

Developer
Developer
Posts: 1,123
Registered: ‎02-10-2009
My Device: 8130 / 8350 / 9530 / 9550 / 9850 / PlayBook
My Carrier: Verizon

Re: SeparatorField--Color?

[ Edited ]

if that is the actual code from your app, you have paint capitalized (Paint). Function names are case sensitive, you need to make it lowercase.

Developer
Posts: 98
Registered: ‎12-29-2009
My Device: Bold
My Carrier: Rogers

Re: SeparatorField--Color?

 


 

Awesome--thank you!