0 Replies Latest reply on May 22, 2008 3:14 AM by Harbs.

    Script UI library

    Harbs. Level 6
      In my quest to make my life easier, I've put together a bit of a library
      of script UI functions. The library was inspired by Bob Stucky some time
      ago when he posted an example function. I took his post to heart...

      It is still a bit of a work in progress, but I'd be happy to share it
      with anyone who wants. If you'd like, send me an email.

      One example of use:

      var listInfo = [
      'One is a very interesting Number\nIt is the first One\nOne is a round
      number!\nmore text',
      'Two is also interesting\nTwo comes after one!"',
      "Three -- I'm getting bored"
      ]
      var listBox = new HarbsUI.StandardListBox
      ('test','List',['one','two','three'],undefined,listInfo);
      listBox.editButton.onClick = function(){
      alert('You are editing something!');
      }
      listBox.newButton.onClick = function(){
      alert('You want to make a new one?');
      }
      listBox.deleteButton.onClick = function(){
      alert('Are you sure you wnat to delete it?');
      }
      if(listBox.dialog.show()){alert('good!')}
      else{alert('no good!')}

      http://in-tools.com/stuff/listbox.png

      This script will produce the script UI dialog pictured in the attached
      screenshot. Clicking on the different list items will change the info in
      the "info window". Double clicking a list item will "click" the edit
      button. The "Edit" and "Delete" buttons are only active when an item is
      selected.

      All created in one line of code! Cool or what? 8-)

      Harbs