BlackBerry Forums Support Community               

Closed Thread
 
LinkBack Thread Tools
Old 10-12-2009, 07:17 AM   #1 (permalink)
Knows Where the Search Button Is
 
Join Date: Mar 2009
Model: 8120
PIN: N/A
Carrier: gmail
Posts: 18
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default set focus in manager's field

Please Login to Remove!

I have a HorizontalFieldManager ,on which I have added 5 ButtonFields.Now what I want is when the screen containing this manager appears, focus should be set to a specific button field (i.e. third button field).I tried all stuffs(setFocus,onFocus..etc ) but focus always goes to the first field in the manger,which is first button.To get the focus on third field I have to use trackball.I want focus to be set automatically on third field when screen appears.Please help me to set the focus on third field.
Offline  
Old 10-12-2009, 09:27 AM   #2 (permalink)
Knows Where the Search Button Is
 
Join Date: Mar 2009
Model: 8120
PIN: N/A
Carrier: gmail
Posts: 18
Post Thanks: 0
Thanked 0 Times in 0 Posts
Default

I have got the solution,we just need to use something like this in the manager class(i have custom manager)

protected void sublayout(int maxWidth, int maxHeight) {

Field f = this.getField(2);
f.setFocus();

}

very easy...
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.