BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 04-03-2007, 08:00 AM   #1 (permalink)
Thumbs Must Hurt
 
Rose's Avatar
 
Join Date: Nov 2006
Location: India
Model: 9700
OS: Windows 7
Carrier: Airtel
Posts: 121
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default Highlighing selected Field

Please Login to Remove!

Hi,
VerticalFieldManager vm = new VerticalFieldManager(VerticalFieldManager.NO_HORI ZONTAL_SCROLL | VerticalFieldManager.NO_VERTICAL_SCROLL|VerticalF ieldManager.FIELD_LEFT);

label1 = new LabelField(" ",LabelField.FOCUSABLE);
label2 = new LabelField(" ",LabelField.NON_FOCUSABLE);
label3 = new LabelField(" ",LabelField.NON_FOCUSABLE);
BitmapField bmF = new BitmapField("Bitmap",BitmapField.NON_FOCUSABLE);

vm.add(label1);
vm.add(label2);
vm.add(bmF );
vm.add(label3);

On selecting (ie Focus)since only one labelField is focusable its only get highlighted.. But i wanna highlight all the items when that label get selected..
(ie) Instead of that one LabelField i wanna highlight
the entire verticalFieldManager itself..
But i cant find any successful way .. I tried overriding the nextFocus and drawFocus method also as mention in some other threads.. But still no use..
Can anyone experienced in this issue can help me .. Waiting for the suggestions.
Offline  
Old 04-03-2007, 08:25 AM   #2 (permalink)
Talking BlackBerry Encyclopedia
 
Join Date: Oct 2006
Model: 7103
Carrier: Verizon
Posts: 259
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi Rose
Create a new class that extends VerticalFieldManager, call it MyVerticalFieldManager or something. Have vm be an instance of that class. In MyVerticalFieldManager override drawfocus like so
protected void drawFocus(Graphics g, boolean on) {

g.setBackgroundColor(focusBackgroundColor);
g.clear();
g.setColor(labelFocusTextColor);
g.paint();
Offline  
Old 04-04-2007, 02:53 AM   #3 (permalink)
Thumbs Must Hurt
 
Rose's Avatar
 
Join Date: Nov 2006
Location: India
Model: 9700
OS: Windows 7
Carrier: Airtel
Posts: 121
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,
Thanks for ur suggestion... But Im addings the elements dynamically to the manager.. It will grow up in size.. So how can i arrange the elements with my verticalManager..
Can u provide me a sample code...
Offline  
Closed Thread


Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On





Copyright 2004-2014 BlackBerryForums.com.
The names RIM and BlackBerry are registered Trademarks of BlackBerry Inc.