home *** CD-ROM | disk | FTP | other *** search
/ Aminet 18 / aminetcdnumber181997.iso / Aminet / dev / e / EasyGUI_v33b2.lha / Src / EasyGUI / tabs_test.e < prev    next >
Text File  |  1997-02-10  |  811b  |  37 lines

  1. MODULE 'tools/easygui', 'tools/exceptions',
  2.        'gadgets/tabs',
  3.        'plugins/tabs'
  4.  
  5. PROC main() HANDLE
  6.   DEF t=NIL:PTR TO tabs
  7.   NEW t.tabs(['Display', -1,-1,-1,-1, NIL,
  8.               'Edit',    -1,-1,-1,-1, NIL,
  9.               'File',    -1,-1,-1,-1, NIL,
  10.               NIL]:tablabel,
  11.              0,FALSE)
  12.   easyguiA('BOOPSI in EasyGUI!',
  13.     [ROWS,
  14.       [TEXT,'Tabs test...',NIL,TRUE,5],
  15.       [PLUGIN,{tabsaction},t],
  16.       [EQCOLS,
  17.         [BUTTON,{reset},'Reset',t],
  18.         [BUTTON,{toggle_enabled},'Toggle Enabled',t]
  19.       ]
  20.     ])
  21. EXCEPT DO
  22.   END t
  23.   report_exception()
  24. ENDPROC
  25.  
  26. PROC tabsaction(i,t:PTR TO tabs)
  27.   WriteF('tabs value = \d\n',t.current)
  28. ENDPROC
  29.  
  30. PROC reset(t:PTR TO tabs,i)
  31.   t.setcurrent(0)
  32. ENDPROC
  33.  
  34. PROC toggle_enabled(t:PTR TO tabs,i)
  35.   t.setdisabled(t.disabled=FALSE)
  36. ENDPROC
  37.