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
New Developer
Posts: 124
Registered: ‎04-29-2009
My Device: Not Specified

bitmap with the label field to be focussed together

hai all,

          i want to create a horizontal manager where

 

 

 

-------------------------------------------------------------

img1  |  img2  |  img3   |

label1|  label2 |  Label3 |

---------------------------------------------------

both the image and the label field must be focussable together,

i tried using vertical manager and paint method but i am not able to focus on it.

 

any sample codes or suggestions

 

kamala

Developer
Posts: 3,951
Registered: ‎07-15-2008
My Device: Not Specified

Re: bitmap with the label field to be focussed together

You do something like, when your Image1 is Selectected, change the abckground color of the Lable1, when it moved to image2, change the background color of label2 and make it looks like it is alos selected. Or else include your lable also in image so it looks like both selected.

 

 


Use Search. "Accept Solution" If the problem is resolved.
Developer
Posts: 19,636
Registered: ‎07-14-2008
My Device: Not Specified

Re: bitmap with the label field to be focused together

Logically you can't have two Fields that are both in focus can you!  So if you reword your question, then you might see a solution (at least this is the solution I would look at)

 

1) Here is one way you could reword your question:

 

I would like to have two different Fields indicate they they are in 'focus' at the same time.

 

As a suggestion, in your BitmapField, override the onFocus and onUnfocus events, and indicate to the labelField that it should paint something to indicate it is focused or unfocused.  The LabelField should be non focusable, as you never need to get it in focus - it is in focus when the bitmapField is in focus.

 

2) Alternatively, here is another way you could reword your question

 

I would like to create a focusable Single Field that displays the Bitmap and the label at the same time. 

 

I think there are examples of creating Fields like this around - look for something that extends BitmapField and displays text.  Note that, for example, you will have override getPreferredHeight to include the Text as well as the Bitmap in the Fields height.

New Developer
Posts: 124
Registered: ‎04-29-2009
My Device: Not Specified

Re: bitmap with the label field to be focused together

hai

        hope u all have seen the ap news screens

here is the link for the screen

http://www.apnews.com/

I want to create the title bar in the  same fashion

 

I will try the method u  both have suggested and check whether ican succed.

nyway this issue is still open for suggestions

help pls

kamala