2 Replies Latest reply on Apr 26, 2018 11:32 AM by geppettol66959005

    enable disable helptip

    geppettol66959005 Level 2

      I'm creating a panel with helptip description buttons

      I would like to create a button that enables or disables these helptips

      How could I achieve this?

       

      this is the starting script

       

      win = new Window("dialog", "test");
      
      
      Test_H= win.add("group");
      baton22 = Test_H.add("group");
      
      
      helptip_test = baton22.add("button", undefined, "HELPTIP 1");
      helptip_test.helpTip = "HELPTIP 1."; 
      helptip_test.minimumSize.width = 224;
      
      
      helptip_test1 = baton22.add("button", undefined, "HELPTIP 2");
      helptip_test1.helpTip = "HELPTIP 2."; 
      helptip_test1.minimumSize.width = 224;
      
      
      helptip_test2 =  win.add("button", undefined, "ENABLE DISABLE");
      helptip_test2.helpTip = "HELPTIP ENABLE DISABLE."; 
      helptip_test2.minimumSize.width = 224;  
      
      
      closeBtn = win.add("button", undefined, "CLOSE");
      closeBtn.helpTip = "CLOSE DIALOG UI.."; 
      
      
      closeBtn.preferredSize.width = 224;
      close = false;
      closeBtn.onClick = function () {
      
      
      win.close();
      };
      
      
      win.show();
      
        • 1. Re: enable disable helptip
          SuperMerlin Level 5
          win = new Window("dialog", "test");  
          
          var help = true;
          
          Test_H= win.add("group");  
          
          baton22 = Test_H.add("group");  
          
          helptip_test = baton22.add("button", undefined, "HELPTIP 1");  
          
          helptip_test.helpTip = "HELPTIP 1.";   
          
          helptip_test.minimumSize.width = 224;  
          
          helptip_test1 = baton22.add("button", undefined, "HELPTIP 2");  
          
          helptip_test1.helpTip = "HELPTIP 2.";   
          
          helptip_test1.minimumSize.width = 224;  
          
          helptip_test2 =  win.add("button", undefined, "ENABLE DISABLE");  
          
          helptip_test2.helpTip = "HELPTIP ENABLE DISABLE.";   
          
          helptip_test2.minimumSize.width = 224;    
          
          helptip_test2.onClick=function(){
              
          help=!help;
           
          if(!help){
          
          helptip_test.helpTip="";
          
          helptip_test1.helpTip="";
          
          helptip_test2.helpTip="";
          
          }else{
              
          helptip_test.helpTip = "HELPTIP 1."; 
              
          helptip_test1.helpTip = "HELPTIP 2.";
              
          helptip_test2.helpTip = "HELPTIP ENABLE DISABLE.";
              
          }
              
          win.layout.layout(true);
              
          }
          
          closeBtn = win.add("button", undefined, "CLOSE");  
          
          closeBtn.helpTip = "CLOSE DIALOG UI..";   
          
          closeBtn.preferredSize.width = 224;  
          
          close = false;  
          
          closeBtn.onClick = function () {  
          
          win.close();  
          
          };  
           
          
          win.show(); 
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          
          • 2. Re: enable disable helptip
            geppettol66959005 Level 2

            Thank you