If I have a TabPane with more than one Tab, how can I set a tab selected? I just couldn't find out.
Hi Wolf K.,
It looks like TabPane.selected is a field (and not a method) so you should just be able to set the selected tab there.
Does something like this work?
tabPane := ...
tab := tabPane.tabs // grab the 3rd tab
tabPane.selected = tab
Tried it, but doesnt't seem to work.
I also thought of sending a click event to the tab in question, but dont know how to do it either.
I think I was doing things in the wrong order. Now found a solution that works for me. In my case I want a certain tab (not the first) to be selected when the window is opened.
Including your code in the onOpen event does the trick.
Thank you very much for your help.
Login or Signup to reply.