Skip to main content
Byron Nash - INSP
Inspiring
August 2, 2022
Answered

Determine which tabbed panel is active

  • August 2, 2022
  • 1 reply
  • 420 views

Trying out tabbed panels in my dialog for the first time. Is there a way to test for which tab is active at a given time?

This topic has been closed for replies.
Correct answer Dan Ebberts

If you labeled your tabs with a text property in the tab definition, this should work:

alert(dialog.tpanel1.selection.text)

1 reply

Dan Ebberts
Community Expert
Community Expert
August 2, 2022

I think tabbedPanel.selection gives you the active tab.

Byron Nash - INSP
Inspiring
August 3, 2022

Thanks for the tip. When I enter the line like this

     alert(dialog.tpanel1.selection);  I get the result [object panel].
I tried adding a .name after selection but that came up undefined. Seems like it's accessing a panel but I'm not sure how to get at the name to identify it. 
Dan Ebberts
Community Expert
Dan EbbertsCommunity ExpertCorrect answer
Community Expert
August 3, 2022

If you labeled your tabs with a text property in the tab definition, this should work:

alert(dialog.tpanel1.selection.text)