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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Java Development

Reply
Contributor
Just_Bart
Posts: 21
Registered: ‎02-06-2011
My Carrier: Telus

Custom field "Down State"

Hello everyone,

 

So I'm trying to make a custom button field that uses images for its states (off state and on state) however, I also want to have a state where if the user is holding down on the trackpad, a different image will show (just like the default buttons do). I've tried various ways using the navigationClick and navigationUnClick methods, but I can't seem to figure it out. Does anyone have any suggestions?

Please use plain text.
Developer
peter_strange
Posts: 17,629
Registered: ‎07-14-2008

Re: Custom field "Down State"

I don't actually understand what you are asking, but have a look here, I think the buttons in here have the 'states' that you want:

 

http://supportforums.blackberry.com/t5/Java-Development/Implement-advanced-buttons-fields-and-manage...

Please use plain text.
Contributor
Just_Bart
Posts: 21
Registered: ‎02-06-2011
My Carrier: Telus

Re: Custom field "Down State"

I mean that buttons have three different looks, when theyre not in focus, when they're in focus, and when they're being pressed down. I need to know how I can implement the pressed down look.

Please use plain text.
Developer
peter_strange
Posts: 17,629
Registered: ‎07-14-2008

Re: Custom field "Down State"

I know that the pillButton given in the samples provided in the previous link implements this, I suspect other buttons do too.  So have a look. 

Please use plain text.
Developer
arkadyz
Posts: 2,268
Registered: ‎07-08-2009
My Carrier: various

Re: Custom field "Down State"


peter_strange wrote:

I know that the pillButton given in the samples provided in the previous link implements this, I suspect other buttons do too.  So have a look. 


embossed buttons do that as well, and they have such a detailed code in paint() that it might be the most useful example. Still, the link Peter provided has such a wealth of UI perks that you would be well-advised to save that code and study it every now and then.

----------------------------------------------------------
please click 'Accept Solution' on posts that provide the solution to the question you've posted. Don't say "Thanks", press 'Like' button instead!
Please use plain text.