2 Replies Latest reply on Nov 22, 2010 9:33 AM by Tom_Veera

    UI Tabbed Panel?


      Hi All,


      I have created a UI Dialog script with Tabbed Panel (two tabs). When I am running my UI script, it's showing first tab. But I want show second tab on executing my script.


      Is it possible?


      Second how I know which tab is active in UI?


      Here is code


      var w = new Window ("dialog", "Tabbed Panel", undefined);
      var tpanel = w.add ("tabbedpanel");
      tpanel.preferredSize = [350,300];
      var general = tpanel.add ("tab", undefined, "Test1");
      var images = tpanel.add ("tab", undefined, "Test2");
      var buttons = w.add ("group");
      buttons.add ("button", undefined, "OK", {name: "ok"});
      w.show ();





        • 1. Re: UI Tabbed Panel?
          milligramme Level 3


          After fixing a bit, it works for me. (OSX 10.6.4, InDesign CS4)

          Test2 is selected first


          use like this

          == > tabbedpanel.selction = tab


          var w = new Window ('dialog', "Tabbed Panel", undefined);
          var tpanel = w.add('tabbedpanel');
          tpanel.preferredSize = [350,300];
          var general = tpanel.add('tab', undefined, "Test1");
          general.add('statictext', undefined, "within Test1 Tab");

          var images = tpanel.add('tab', undefined, "Test2");
          images.add('statictext', undefined, "within Test2 Tab");
          tpanel.selection = images;

          var buttons = w.add('group');
          buttons.add ('button', undefined, "OK", {name: 'ok'});
          w.show ();

          • 2. Re: UI Tabbed Panel?
            Tom_Veera Level 1

            Sorry for late reply.


            Thanks, its solved my problem.