tabset requestFocus() does not work

Post any questions you have about using the Verj.io Studio, including client and server-side programming with Javascript or FPL, and integration with databases, web services etc.

Moderators: Jon, Steve, Ian, Dave

Segi
Ebase User
Posts: 649
Joined: Mon Dec 09, 2013 6:37 pm

tabset requestFocus() does not work

#1

Postby Segi » Tue Jan 20, 2015 4:43 pm

I have a Tab Set control in my application. In the before page event, if a certain condition is met, I call control.VIEW_TAB.requestFocus() in order to set the focus on a specific tab in the tab set but this doesn't seem to have any effect and the focus remains on the first tab in the tab set.

Is this a bug in eBase ? This behavior is the same no matter which tab I request focus on.

I also did a test where I created a button that calls control.VIEW_TAB.requestFocus() in its event to be sure that it wasn't something that has to do with the before page event but I get the same results.
0 x

Jon
Moderator
Moderator
Posts: 1342
Joined: Wed Sep 12, 2007 12:49 pm

#2

Postby Jon » Wed Jan 21, 2015 7:33 am

To change the visible tab, you need to set the selected property of the Tab Set Control with the item name property of the new tab e.g.

Code: Select all

controls.TABSET.selected = "Tab2";
or..

Code: Select all

controls.TABSET.selected = controls.VIEW_TAB.itemName;
0 x


Who is online

Users browsing this forum: No registered users and 22 guests