home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 7 / Apprentice-Release7.iso / Utilities / Programming / Dialog Director 0.6 / Examples / Icons & Pict.as < prev    next >
Encoding:
Text File  |  1997-04-08  |  1.3 KB  |  32 lines  |  [TEXT/ToyS]

  1. global rf, pict1, arrow, cicn1, cicn2, cicn3, icon1, icon2
  2.  
  3. set rf to res open (choose file with prompt "Where is “Picts & Icons”?" of type "rsrc")
  4. try
  5.     set pict1 to res get rf type "PICT" id 130
  6.     set arrow to res get rf type "cicn" id 129
  7.     set cicn1 to res get rf type "cicn" id 1000
  8.     set cicn2 to res get rf type "cicn" id 1010
  9.     set cicn3 to res get rf type "cicn" id 1020
  10.     set icon1 to res get rf type "ICON" id 128
  11.     set icon2 to res get rf type "ICON" id 129
  12. on error number n
  13.     res close rf
  14.     error number n
  15. end try
  16. res close rf
  17.  
  18. set dItems to [¬
  19.     {class:push button, bounds:[290, 300, 350, 320], name:"OK"}, ¬
  20.     {class:push button, bounds:[210, 300, 270, 320], name:"Cancel"}, ¬
  21.     {class:pict, bounds:[20, 20, 241, 241], contents:pict1}, ¬
  22.     {class:icon, bounds:[20, 57, 20 + 61, 57 + 34], contents:arrow}, ¬
  23.     {class:icon, bounds:[40, 200, 72, 232], contents:1}, ¬
  24.     {class:icon, bounds:[110, 200, 142, 232], contents:2}, ¬
  25.     {class:icon, bounds:[40, 250, 72, 282], contents:icon1}, ¬
  26.     {class:icon, bounds:[110, 250, 142, 282], contents:icon2}, ¬
  27.     {class:icon, bounds:[200, 200, 240, 240], contents:cicn1}, ¬
  28.     {class:icon, bounds:[250, 200, 290, 240], contents:cicn2}, ¬
  29.     {class:icon, bounds:[300, 200, 340, 240], contents:cicn3} ¬
  30.         ]
  31. dd auto dialog {size:[360, 330], contents:dItems, name:¬
  32.     "Pict & Icon Resources", style:movable modal} with greyscale