home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 480.lha / BuildScreen_v2.0 / ex2 < prev    next >
Encoding:
Text File  |  1991-02-06  |  2.8 KB  |  62 lines

  1. Image b1  e1.pic
  2. Image b2  e2.pic
  3.  
  4. BeginGadgetList
  5.    AddGadgetImageButton2 300 30 b1 b2 50
  6.    GadgetOpt    . ""               -    !  gadget flags . means use defaults
  7.                 + "TOGGLESELECT"   -    !  activation flags + means add to defaults
  8.                 0                       !  mutual exclude
  9.    AddGadgetinteger      30 100         - ! x,y
  10.                         20 100          - ! screen, buff sizes
  11.                         0 0             - ! init value
  12.                         200               ! gadget id
  13.    AddGadgetProp       160 120 20 60     - ! left,top,wid,height
  14.                        0 1              - ! horz,vert enables
  15.                        5000 5000        - ! pot values to start with
  16.                        10000 10000      - ! body values
  17.                        -1                 ! gadget id -1 means last+1
  18.    AddGadgetString     30  60            - ! x,y
  19.                        25  100          - ! size on screen, size of buffer
  20.      "Enter a string here" "spare"      - ! initial string, spare arg
  21.                         -1                ! gadid use prior value + 1
  22. EndGadgetList mygadgets
  23.  
  24.  
  25. CreateScreen sname 704  - ! width
  26.                    420  - ! height
  27.                    4    - ! depth
  28.                   "scr1"   b1 - ! This is the title and the color map to use
  29.                   6 4     ! detail block pens
  30.  
  31.    CreateWindow           -
  32.                 wname     -  ! window name
  33.                 sname     -  ! screen name
  34.                 50        -  ! origin
  35.                 50        -
  36.                 500       -  ! the width
  37.                 280       -  ! the height
  38.                 "closewindow menupick gadgetup"         -  ! idcmp flags
  39.                 "WINDOWCLOSE activate windowdrag windowsizing"                  -  ! window flags
  40.                 mygadgets                               -  ! gadgets
  41.                 ""                                         ! window title
  42. !       MenuItemHeight 10
  43. !       NextItemColumnOffset 95
  44.  
  45.        BeginMenuStrip
  46.            addmenu "  First menu  "
  47.               addmenuitem "menu item one"
  48.               menuitemOpt =                     - ! = means set the flags to the next arg
  49.                  "commseq itemtext itemenabled highbox" - ! flags
  50.                            0                    - ! mutual exclude  0xxx = hex, xxx = decimal
  51.                            "y"                   - ! the char (requires commseq flag)
  52.                            1 2 jam1
  53.  
  54.               addmenuitems "menu item two" 0 "menu item three" 0 !each uses prior attributes 0=no mutual excludes
  55.        EndMenuStrip  mstrip wname
  56.  
  57. textat wname 20 180 "Try gadgets and menus, then exit with close" 1 2 jam1
  58. palette wname 20 220 10 10
  59.  
  60. rexx      wname  xxxport     !quits on close hit or CLOSE sent to port foobarport
  61. wbenchtoback
  62.