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
Regular Contributor
Posts: 81
Registered: ‎09-09-2010
My Device: Not Specified
Accepted Solution

set style of bitmapfield

[ Edited ]

hi guys

 

     do I dynamic set the style of bitmapfield ?

for example I need set bitmapfield to disable in some state that I don't let user who could click.

Although I disable fieldchangenotify of touch.unclick and trackwheelclick in some state I set,

but when I use bold phone ex.9650 move trackball on bitmapfield I set disable, it is still  focused.

so I need dynamic set unfocus and focus.

can anyone tell me how to do?

thx

 

 

Developer
Posts: 604
Registered: ‎12-27-2010
My Device: Not Specified

Re: set style of bitmapfield

You can override isFocusable() and keep a flag somewhere to return whether or not it should be accepting focus. If you have multiple of these it's probably easiest to just create a class that extends BitmapField, then just make a public method to change the flag for when you need to enable/disable it.

Developer
Posts: 2,268
Registered: ‎07-08-2009
My Device: various
My Carrier: various

Re: set style of bitmapfield

Exactly what jprofitt said - with one addition:

BlackBerry API 6.0 added a new method in Field - setEnabled. Looks like they finally realized the need for that...

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