04-11-2011 03:49 AM - edited 04-11-2011 03:51 AM
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
Solved! Go to Solution.
04-11-2011 09:22 AM
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.
04-11-2011 10:06 AM
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...