Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

TabLayoutPanel.selectedTab error

 
peter tong
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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


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?!!
 
Maneesh Godbole
Saloon Keeper
Posts: 11021
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try removing the call to setVisible. I suspect that is causing the conflict.
 
peter tong
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
finally I create a ScheduledCommand for tayLayoutPanel.selectTab(1);

Although in java,


the sSearchDetailResult should already be created before selectTab is run, but after compile to javascript, seems not the case (just I guess), after I use ScheduledCommand, the problem is solved.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic