9 Replies Latest reply on Dec 11, 2015 1:17 AM by Trevorׅ

    Refresh Window

    bala281972 Level 1

      Hi,

      I'm trying to swap the images as and when the user clicks the left / right button. After clicking the left arrow I'm unable to refresh the window. Any help on this ?

       

      var win = new Window ("dialog", "Bouquet");
      win.tabs = win.add('tabbedpanel');
      win.tabs.ft = win.tabs.add('tab',undefined,'Data');
      win.tabs.st = win.tabs.add('tab',undefined,'Library');
      var image1 = win.tabs.ft.add("image", undefined, File ("/Users/Admin/Desktop/L23-1Pr_2ImHR-NTUP.png.png"));
      win.tabs.ft.librow1=win.tabs.ft.add('group')
      win.tabs.ft.librow1.orientation='row'
      var image2 = win.tabs.ft.librow1.add("image", undefined, "/DATA/left.png")
      var image3 = win.tabs.ft.librow1.add("image", undefined, "/DATA/ok.png")
      var image4 = win.tabs.ft.librow1.add("image", undefined, "/DATA/right.png")
      image2.addEventListener('click',function(){
              alert ("You Pressed Left");
                      var image1 = win.tabs.ft.add ("image", undefined, File ("/Users/Admin/Desktop/L22-1Pr_1ImHR-NTUP.png.png"));           
                      win.update();
              })
      image3.addEventListener('click',function(){
              alert ("You Pressed OK");
              })
      image4.addEventListener('click',function(){
            alert ("You Pressed Right");
              })
      win.show ();
      
      
      
      

       

      Screen Shot 2015-12-09 at 7.11.36 PM.png