Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus.

1,167 views
Skip to first unread message

tong123123

unread,
Mar 2, 2012, 1:23:45 AM3/2/12
to google-we...@googlegroups.com
there is a TablayoutPanel tabLayoutPanel, and FocusPanel SSearchDetailResult

there is a button in the first tab of tabLayoutPanel and when press that button, I want the focuspanel tab is selected, so I write
[code]
SSearchDetailResult sSearchDetailResult = new SSearchDetailResult();
tabLayoutPanel.add(sSearchDetailResult, "Detail");
sSearchDetailResult.setVisible(true);
tabLayoutPanel.selectTab(sSearchDetailResult);
// tabLayoutPanel.selectTab(1);
[/code]

the result is the sSearchDetailResult can be selected, but there is error in eclipse development tab as follow:

JavascriptException: (Error): Can't move focus to the control because it is invisible, not enabled, or of a type that does not accept the focus.

what is the problem come from?!!

mukarev

unread,
Mar 5, 2012, 12:54:01 PM3/5/12
to google-we...@googlegroups.com
Hi tong,

maybe that error occurs, because your widget is somewhere out of sight of the client. Check it via FireBug or something else.

You should check for css styles - with "display:none" or "visibility:hidden", too.

If that doesn't help, please let's have a look at the SSearchDetailResult class.

Greetz,
Markus
Reply all
Reply to author
Forward
0 new messages