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

  1. on PetDialog(petName, petType, petRelation)
  2.     set iOK to {class:push button, bounds:[40, 192, 98, 212], name:"OK"}
  3.     set iCancel to {class:push button, bounds:[168, 192, 226, 212], name:"Cancel"}
  4.     set iName to {class:text field, bounds:[72, 16, 259, 32], name bounds:[8, 16, 57, 32], name:"name:", value:petName}
  5.     set iAnimal to {class:radio group, bounds:[26, 48, 130, 66], button offset:[120, 16], max down:4, contents:¬
  6.         ["cat", "dog", "weasel", "snake", "moose", "parakeet", "squirrel", "gila monster"], value:petType}
  7.     set iRelation to {class:radio group, bounds:[26, 142, 126, 158], button offset:[120, 16], max down:2, contents:¬
  8.         ["love", "hate", "who cares?", "get along"], value:petRelation}
  9.     set iRelFrame to {class:group box, name:" Relation with: ", bounds:[10, 132, 260, 180], style:secondary group}
  10.     --set iMenu to {class:pop up, label:"Menu:", bounds:[34, 229, 234, 249], label width:60, value:1, contents:¬
  11.     --    "One;Two;(-;Three"}
  12.     
  13.     set dItems to [iOK, iCancel, iName, iAnimal, iRelation, iRelFrame] --, iMenu]
  14.     return dd auto dialog {default:1, size:[270, 226], contents:dItems}
  15. end PetDialog
  16.  
  17. get PetDialog("Abbey", 3, 1)