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

Reply
Developer
B-Developed
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?

 

Please use plain text.
Developer
DAquilina
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
Please use plain text.
Developer
simon_hain
Posts: 16,001
Registered: ‎07-29-2008
My Device: Z10 LE
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
Please use plain text.
Developer
B-Developed
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.

 

Please use plain text.
Developer
B-Developed
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?

Please use plain text.
Developer
Developer
CMY
Posts: 1,122
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.

Please use plain text.
Developer
B-Developed
Posts: 98
Registered: ‎12-29-2009
My Device: Bold
My Carrier: Rogers

Re: SeparatorField--Color?

 


 

Awesome--thank you!

 

Please use plain text.