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
Contributor
Posts: 42
Registered: ‎03-17-2012
My Device: Blackberry playbook

Problem with focus in a Manager inside of TableLayoutManager

Hello, I use TableLayoutManager in my form.

For password field, I use a component make by myself. It´s an horizontalFieldManager with a PasswordEditField on left and a focusable BitmapButtonField on right. If I push on BitmapButton, the PasswordEditField replace for TextEditField and it show me the password. 

I add my password component (ShowOrHidePasswordEditField) in the TableLayoutManager thereby:

 

[...]

TableLayoutManager table = new TableLayoutManager(new int[]{ TableLayoutManager.USE_PREFERRED_SIZE, TableLayoutManager.SPLIT_REMAINING_WIDTH,},Manager.HORIZONTAL_SCROLL); nifField = new ShowOrHidePasswordEditField("","", 50, BasicEditField.FILTER_DEFAULT|TextField.NO_NEWLINE); nifField.setChangeListener(this); table.add(nifLabel); table.add(nifField); table.add(new SeparatorField()); table.add(new SeparatorField());

[...]

 

With this code I can set the focus in the BitmapButtonField, and it works fine. But If I add other component just below, thereby:

 

table.add(nifLabel);
table.add(nifField);
table.add(new SeparatorField());
table.add(new SeparatorField());
table.add(new LabelField("Test"));
table.add(new TextField());

 I can´t set the focus in BitmapButtonField.

 

 

I´ve added the code of nextFocus that you explain in other thread, but it´s the same. What can I do?

Thank you.

 

 

Developer
Posts: 19,612
Registered: ‎07-14-2008
My Device: Not Specified

Re: Problem with focus in a Manager inside of TableLayoutManager