1 Reply Latest reply on Mar 16, 2014 1:27 AM by Trevorׅ

    ui Help

    JonnyDL Level 1

      I'm trying to build a small simple ui, but I am having trouble with some of the things I want to do with it. I'm trying to use location, size and spacing to arrange the items better in the dialog window. I also can't seem to figure out how to get a button to work an onClick action.

      (I've done it before), but my guess is the way I built the dialog, makes it more difficult to get the buttons working.


      Here is what I have built below.


      for example: I would like to add space between the panel and the radio buttons, and move the whole panel up and left.


      The other issue is I have a simple onclick test to check if the button works. I can't seem to get the onclic to work. Is it because I have it built in a group, and Im not acessing it correctly?


      var bleedGuideDialog = new Window ("dialog", "Bleed Guides");

      var topGroup = bleedGuideDialog.add ("group");

      topGroup.orientation = "row"

      topGroup. alignment="left";

      var radioPanel = topGroup.add("panel", undefined, "Guide Options");

          radioPanel.size = [140,75];

          var show = radioPanel.add("radiobutton",  undefined, "Show Guides", );

          show.value = true;

          show. alignment="left";

          var hide = radioPanel.add("radiobutton",  undefined, "Hide Guides");

          hide.value = false;

          hide. alignment="left";

      var directions = topGroup .add("statictext", undefined, "Export will create a PDF with the guides to show what items would be cut off thatare in the bleed area.",{multiline:true});

      //p1 = w.add ('edittext {preferredSize: [200, 100], properties: {multiline: true}}');

      directions.size = [130, 100]

      var middleGroup = bleedGuideDialog.add ("group");

      middleGroup.orientation = "row"

          var prgBar = middleGroup.add("progressbar", {x:20, y:12, width:200, height:12}, 0, 100);

          var exportbtn = middleGroup.add("button",  undefined, "Export");

      var cancelit = bleedGuideDialog.add("button",  undefined, "Cancel");

      cancelit.alignment = "right";



      bleedGuideDialog.show ( );



      exportbtn.onClick =function ()






      Any help/Guidence would be appreciated.