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
Posts: 111
Registered: ‎10-01-2009
My Device: Not Specified

focus on field / manager clarification

Is it correct that you can only have a single field focused at any time?  I am using the TextBitmapManager example from the recent UI tutorial video -- so my screen has a list of fields with an icon and corresponding text.  The text will highlight/focus fine, but not the images.  Is the only solution to write some kind of focus listener to also draw something around the image?

Developer
Posts: 16,786
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: focus on field / manager clarification

only a single field can have the focus. you can, however, have several fields appear to be focused by interfering with their painting. you have to decide where the real focus have to be, of course.

----------------------------------------------------------
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: 111
Registered: ‎10-01-2009
My Device: Not Specified

Re: focus on field / manager clarification

hrmm thats what i figured. so if i wanted to repaint the bitmap field to match the associated textfield that has focus, is there just a default highlighted style thats used to repaint as if it were focused? im just not sure how to re-write a paint method to emulate what a field looks like if its focused.

Developer
Posts: 16,786
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport
My Carrier: O2 Germany

Re: focus on field / manager clarification

you can try drawFocus

----------------------------------------------------------
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: 111
Registered: ‎10-01-2009
My Device: Not Specified

Re: focus on field / manager clarification

ahh yeah Smiley Happy thanks. that does almost what i want ... so if i have a list of icons/text on the screen, i can now get it to "focus" both the icon and the text  (both are drawn as focused) when i select them.  although it individually highlights the icon and the text, and not the full row. (so its large highlighted square icon, white space, smaller highlighted text -- instead of full highlighted row). im guessing i should just redo this as a listfield ...

 

thanks for your help