Add function to get currently active tab index

This commit is contained in:
Nathan Gray 2014-06-16 15:16:59 +00:00
parent d23d41ca50
commit aa249cb6a2

View File

@ -335,6 +335,20 @@ var et2_tabbox = et2_valueWidget.extend([et2_IInput],
this.setActiveTab(this.selected_index); this.setActiveTab(this.selected_index);
}, },
/**
* Gets the index of the currently active tab
*
* @returns {number}
*/
get_active_tab: function() {
return this.selected_index;
},
/**
* Sets the currently active tab by index
*
* @param {number} _idx
*/
setActiveTab: function(_idx) { setActiveTab: function(_idx) {
this.selected_index = _idx; this.selected_index = _idx;