6 Replies Latest reply on Jan 7, 2017 5:48 PM by Marc Autret

    scriptUI: how to refresh a 'disabled' tab from tabbed panel

    eboda_snaf Level 1

      @Hi there,

      Anyone knows how to disable tab from tabbed panel when clicked on a button?

      I noticed that my tab does turn gray/black when it was disabled/enabled unless i clicked on it.

      How to make it refresh automatically when clicked?





      code below:

      var w = new Window ("dialog", "test", undefined, {closeButton: false});
      w.alignChildren = "right";
      var tpanel = w.add ("tabbedpanel");
      tpanel.alignChildren = ["fill", "fill"];
      tpanel.preferredSize = [350,300];
      var general = tpanel.add ("tab", undefined, "Text");
      var images = tpanel.add ("tab", undefined, "Images");

      var buttons = w.add ("group");
      buttons.add ("button", undefined, "close", {name: "ok"});
      hide = buttons.add ("button", undefined, "disable 'Images' ");
      hide.onClick = function(){ 
         images.enabled =false;   
      w.show ();