Which tab is the active one in a tabbed panel?
- September 23, 2021
- 1 reply
- 392 views
Friends an experts,
The problem is related to the ScriptUI implementation. There seems to be a difference between the ID implementation and the FM implementation.
I have a window wPalM with 3 tabs in the tabbed panel tp:
wPalM.tp.tAny
wPalM.tp.tIndx
wPalM.tp.tIndxV
In each of these tabs there is an edit field and other controls.
When pressing a button on the top level (wPalM) i want to know on which edit-field I will operate (wPalM...eMarkerContens).
In the famous “SriptUI for Dummies” Peter Kahrel suggests to use tpanel.selection = 1 for the second tab. But I can not find that this property is a numeric index. It is [object panel].
I can not find how to know the currently active tab. Neither .visible, nor .active is helpful. The only useful information is in wPalM.tp.selection.text - but this depends on the language of the interface and is really clumsy:
if (wPalM.tp.selection.text == KLD_M.UItxt.wPalM.@tptAnytitle.toString() ) { ...}
if (wPalM.tp.selection.text == KLD_M.UItxt.wPalM.@tptIndxtitle.toString() ) { ...}
if (wPalM.tp.selection.text == KLD_M.UItxt.wPalM.@tptIndxVtitle.toString() ) { ...}
(UItxt is an XML structure which is switched between UI languages along these lines:
<wPalM tptAnytitle = "Any marker" />
<wPalM tptIndxtitle = "Index marker" />
<wPalM tptIndxVtitle = "Template marker" />
I’m looking for a solution with an index!

