4 Replies Latest reply on Sep 12, 2015 9:50 AM by SuperMerlin

    Find out if tab is selected in tabbed panel?

    Whatevermajorloser Level 1

      I have a dialog that comes up with some options housed under two tabs:


      var tabs = main.add('tabbedpanel')
      var single = tabs.add('tab', undefined, 'Single')
      single.orientation = "column";
      var multiple = tabs.add('tab', undefined, 'Multiple')
      tabs.selection = single;


      The above is just an extract of the whole code, but the Ok button at the bottom of this dialog passes parameters into a function that runs once pressed. The two tabs have different purposes, so when the Ok button is pressed, the function needs to know which tab is selected. Even though I've passed 'tabs.selection' into the function, it doesn't work. Printing tabs.selection to the console gives me '[object Panel]' when I was hoping it would print whatever is selected.


      What am I doing wrong?