home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Utilities / Programming / Dialog Director 0.6 / Examples / Pop-Up Sample.as < prev    next >
Encoding:
Text File  |  1997-04-15  |  1.1 KB  |  30 lines  |  [TEXT/ToyS]

  1. property dMenu : {size:[200, 100], name:"Please Try One", style:movable modal, contents:[¬
  2.     {class:push button, bounds:[10, 70, 190, 90], name:"Goodbye"}, ¬
  3.     {class:push button, bounds:[10, 10, 190, 30], name:"Standard Pop-Up"}, ¬
  4.     {class:push button, bounds:[10, 40, 190, 60], name:"Type-In Pop-Up"}]}
  5. property theSizes : "9;10;12;14;18;24;36;48"
  6. property dStdPopUp : {size:[120, 80], contents:[¬
  7.     {class:push button, bounds:[50, 50, 110, 70], name:"OK"}, ¬
  8.     {class:pop up, bounds:[10, 10, 130, 29], contents:theSizes, name:"Size:"}]}
  9. property dTypeInPopUp : {size:[120, 80], contents:[¬
  10.     {class:push button, bounds:[50, 50, 110, 70], name:"OK"}, ¬
  11.     {class:pop up, bounds:[95, 10, 130, 29], contents:theSizes, text field:3}, ¬
  12.     {class:text field, bounds:[50, 11, 90, 27], name:"Size:", name bounds:[10, 11, 50, 27], value:9}]}
  13.  
  14. set dVals to [null, null]
  15.  
  16. dd install with greyscale
  17. set d to dd make dialog dMenu
  18. repeat
  19.     set i to dd interact with user
  20.     if i = 2 then
  21.         set item 1 of dVals to dd auto dialog dStdPopUp
  22.     else if i = 3 then
  23.         set item 2 of dVals to dd auto dialog dTypeInPopUp
  24.     else
  25.         exit repeat
  26.     end if
  27. end repeat
  28. dd uninstall
  29.  
  30. dVals