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: 255
Registered: ‎05-03-2012
My Device: 9930
My Carrier: Vodafone

Focus Color of ObjectChoiceField

I want to change focus color of objectchoicefield. I have used following code. But still i am getting default focus color i.e. blue.


combo = new ObjectChoiceField("",choice)
{
boolean _inFocus = false;
public void onFocus(int direction)
{
_inFocus = true;
super.onFocus(direction);
this.invalidate();
}
public void onUnfocus()
{
_inFocus = false;
super.onUnfocus();
this.invalidate();
}
public void paint(Graphics g)
{
g.setColor(Color.BLACK);
if ( _inFocus )
g.setBackgroundColor(0x00D8632E);
else
g.setBackgroundColor( Color.WHITE );
g.clear();
super.paint(g);
}
};

Developer
Posts: 434
Registered: ‎07-23-2012
My Device: Blackberry 10
My Carrier: Orange

Re: Focus Color of ObjectChoiceField

check this

http://stackoverflow.com/questions/9617970/how-to-change-background-color-of-object-choice-field-in-...

 

Thanks
-------------------------------------------------------------------------------------
Press the Accept as solution Button when u got the Solution
Press Kudo to say thank to developer.
-------------------------------------------------------------------------------------.
Developer
Posts: 255
Registered: ‎05-03-2012
My Device: 9930
My Carrier: Vodafone

Re: Focus Color of ObjectChoiceField

This is not working. When i setBackgroud() to objectchoicefield,the background color is set for whole manager. Smiley Sad
Developer
Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Focus Color of ObjectChoiceField

there was an API that supported that but it was discontinued, you would have to customize your own field.
----------------------------------------------------------
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
Highlighted
Developer
Posts: 255
Registered: ‎05-03-2012
My Device: 9930
My Carrier: Vodafone

Re: Focus Color of ObjectChoiceField

How should i customize this objectchoicefield?
Developer
Posts: 17,025
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: Focus Color of ObjectChoiceField

for the selection i would suggest a popupscreen with an objectlistfield.
----------------------------------------------------------
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: 255
Registered: ‎05-03-2012
My Device: 9930
My Carrier: Vodafone

Re: Focus Color of ObjectChoiceField

Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Focus Color of ObjectChoiceField

Resolved then?

 

Please mark it so.....

Developer
Posts: 255
Registered: ‎05-03-2012
My Device: 9930
My Carrier: Vodafone

Re: Focus Color of ObjectChoiceField

how to use pop up screen with objectchoiceield?
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: Focus Color of ObjectChoiceField

Simons suggestion was a PopupScreen with an ObjectListField.