home *** CD-ROM | disk | FTP | other *** search
/ PC World 2002 June / PCWorld_2002-06_cd.bin / Software / Komercni / xbase / express / exd17208.r04 / exp17 / Samples / xsample6.prg < prev   
Encoding:
Text File  |  2002-01-30  |  16.4 KB  |  833 lines

  1. *-- PROGRAM FILE -------------------------------------------------------------
  2. * Application: eXPress++ Library
  3. *  Description: eXPress++ sample programs
  4. *    File Name: xsample6.prg
  5. *       Author: Roger Donnay          Tester:
  6. * Date created: 09/03/00              Date updated: 11/07/2001
  7. *    Copyright: (c) 2001 by DONNAY Software Designs
  8. *-----------------------------------------------------------------------------
  9.  
  10. #include "DCDIALOG.CH"
  11. #include "SET.CH"
  12. #include "XBP.CH"
  13. #include "APPEVENT.CH"
  14. #INCLUDE "inkey.CH"
  15. #INCLUDE "dcicon.CH"
  16. #INCLUDE "dcgrump.ch"
  17. #INCLUDE "dcbitmap.ch"
  18. #INCLUDE "dcgra.ch"
  19. #include "dcfields.ch"
  20. #INCLUDE "dccursor.CH"
  21. #INCLUDE "dcprint.CH"
  22. #include "font.ch"
  23. #include "dcapp.ch"
  24.  
  25. #define CRLF              Chr(13) + Chr(10)
  26.  
  27.  
  28. FUNCTION X_Samples_6( oDialog )
  29.  
  30. LOCAL GetList := {}, nTest := 0, cMemo := '', oMemo, i, j, oDlg, ;
  31.       lDebugCreate := .f., lDebugEvent := .f., GetOptions, aApp[1], ;
  32.       cTitle, oDlgWindow, aCoords, oSourceFile, cSource
  33.  
  34. SET DEFA TO
  35. SET PATH TO ..\DATA
  36.  
  37. cTitle := 'eXPress++ Sample Programs (Set 6)'
  38. nTest := 0
  39. cMemo := ''
  40. lDebugEvent := .f.
  41. lDebugCreate := .f.
  42.  
  43. FOR i := 1 TO  5
  44.   FOR j := 1 TO 6
  45.     nTest++
  46.     @ j-1,1 + (i-1)*14 DCRADIO nTest             ;
  47.       VALUE nTest ;
  48.       PROMPT XSample_Header(nTest)               ;
  49.       ACTION {||XSample_Memo(nTest,oMemo,oSourceFile,@cSource)}  ;
  50.       COLOR XSample_Color(nTest)
  51.   NEXT j
  52. NEXT i
  53. nTest := 1
  54.  
  55. @ 2,73 DCPUSHBUTTON CAPTION 'Run Sample'  ;
  56.       SIZE 12, 1                               ;
  57.       ACTION {||XSample_Run(nTest,oDialog,lDebugCreate,lDebugEvent,GetList,GetOptions)}
  58.  
  59. @ 3,73 DCPUSHBUTTON CAPTION 'Print Source'  ;
  60.       SIZE 12, 1                               ;
  61.       ACTION {||XSample_Print(cSource)}
  62.  
  63.  
  64. @ 4,73 DCPUSHBUTTON CAPTION 'Exit' ;
  65.       SIZE 12, 1  ;
  66.       ACTION {||PostAppEvent(xbeP_Close,,,oDlg)}
  67.  
  68. @ 5,73 DCCHECKBOX lDebugEvent PROMPT 'Debug Events'
  69.  
  70. @ 6.3,5 DCSAY '' SAYSIZE 60 COLOR GRA_CLR_DARKBLUE ;
  71.       OBJECT oSourceFile FONT '8.Courier Bold'
  72.  
  73. @ 7,1 DCMULTILINE cMemo ;
  74.      OBJECT oMemo ;
  75.      SIZE 85,12 ;
  76.      FONT '8.Alaska Crt'
  77.  
  78. DCGETOPTIONS ;
  79.     ICON ICON_EXPRESS ;
  80.     NOBUSY ;
  81.     CASCADE
  82.  
  83. DCREAD GUI ;
  84.       OPTIONS GetOptions ;
  85.       EVAL {||XSample_Memo(nTest,oMemo,oSourceFile,@cSource)} ;
  86.       APPWINDOW oDialog ;
  87.       PARENT @oDlg ;
  88.       TITLE cTitle ;
  89.       FIT
  90.  
  91. CLOSE DATABASES
  92.  
  93. RETURN nil
  94.  
  95. * ---------------------------- *
  96.  
  97. STATIC FUNCTION XSample_Memo( nTest, oMemo, oSourceFile, cSource )
  98.  
  99. LOCAL cFunction, nFound, cSourceFile
  100.  
  101. cSource := ''
  102. nTest += 162
  103. cFunction := 'XSample_' + Alltrim(Str(nTest))
  104.  
  105. cSourceFile := 'XSAMPLE6.PRG'
  106. cSource := MemoRead(cSourceFile)
  107. IF Empty(cSource)
  108.   cSourceFile := '..\PRG\XSAMPLE6.PRG'
  109.   cSource := MemoRead(cSourceFile)
  110. ENDIF
  111. IF Empty(cSource)
  112.   cSource := 'XSAMPLE6.PRG cannot be found'
  113. ENDIF
  114.  
  115. nFound := AT('FUNCTION ' + cFunction,cSource)
  116. cSource := Substr(cSource,nFound)
  117. nFound := AT('*** END OF EXAMPLE ***',cSource)
  118. cSource := Substr(cSource,1,nFound+21)
  119.  
  120. IF !Empty(cSource)
  121.   oMemo:setData(cSource)
  122.   oSourceFile:setCaption(cSourceFile)
  123. ENDIF
  124. RETURN nil
  125.  
  126. * -------------------
  127.  
  128. STATIC FUNCTION XSample_Print( cSource )
  129.  
  130. LOCAL oPrinter, nLineCount := MLCount(cSource), i, cMemoLine, nRow
  131.  
  132. DCPRINT ON TO oPrinter PREVIEW FONT '10.Courier' NONSTOP HIDE
  133. IF Valtype(oPrinter) # 'O' .OR. !oPrinter:lActive
  134.   RETURN nil
  135. ENDIF
  136. nRow := 1
  137. FOR i := 1 TO nLineCount - 1
  138.   cMemoLine := MemoLine( cSource, nil, i )
  139.   @ nRow++,2 DCPRINT SAY cMemoLine PRINTER oPrinter
  140.   IF nRow > 60
  141.     DCPRINT EJECT
  142.     nRow := 1
  143.   ENDIF
  144. NEXT
  145. DCPRINT OFF
  146.  
  147. RETURN nil
  148.  
  149. * ---------------------------- *
  150.  
  151. STATIC FUNCTION XSample_Run( nTest, oDialog, lDebugCreate, lDebugEvent, ;
  152.                              GetList, GetOptions )
  153.  
  154. LOCAL nDebug := 0, lVer20, lVer15, lVer17, oThread
  155.  
  156. #ifdef EXPRESS20
  157.   lVer20 := .t.
  158. #else
  159.   lVer20 := .f.
  160. #endif
  161.  
  162. #ifdef EXPRESS17
  163.   lVer17 := .t.
  164. #else
  165.   lVer17 := .f.
  166. #endif
  167.  
  168. #ifdef EXPRESS15
  169.   lVer15 := .t.
  170. #else
  171.   lVer15 := .f.
  172. #endif
  173.  
  174. DC_Gui(.t.)
  175.  
  176. nTest += 162
  177. IF lDebugCreate
  178.    nDebug += DCGUI_DEBUG_CREATE
  179. ENDIF
  180. IF lDebugEvent
  181.    nDebug += DCGUI_DEBUG_EVENTS
  182. ENDIF
  183. DC_ReadGuiDebug(nDebug)
  184. CLOSE ALL
  185. SET DEFA TO
  186.  
  187. IF nTest = 163 .AND. ( lVer17 .OR. lVer20 )
  188.    XSample_163()
  189. ELSEIF nTest = 164 .AND. ( lVer17 .OR. lVer20 )
  190.    XSample_164()
  191. ELSEIF nTest = 165
  192.    XSample_165()
  193. ELSEIF nTest = 166
  194.    XSample_166()
  195. ELSEIF nTest = 167
  196.    XSample_167()
  197. ELSEIF nTest = 168
  198.    XSample_168()
  199. ELSEIF nTest = 169
  200.    XSample_169()
  201. ELSEIF nTest = 170
  202.    XSample_170()
  203. ELSEIF nTest = 171
  204.    XSample_171()
  205. ELSEIF nTest = 172
  206.    XSample_172()
  207. ELSEIF nTest = 173
  208.    XSample_173()
  209. ELSEIF nTest = 174
  210.    XSample_174()
  211. ELSEIF nTest = 175
  212.    XSample_175()
  213. ELSEIF nTest = 176
  214.    XSample_176()
  215. ELSEIF nTest = 177
  216.    XSample_177()
  217. ELSEIF nTest = 178
  218.    XSample_178()
  219. ELSEIF nTest = 179
  220.    XSample_179()
  221. ELSEIF nTest = 180
  222.    XSample_180()
  223. ELSEIF nTest = 181
  224.    XSample_181()
  225. ELSEIF nTest = 182
  226.    XSample_182()
  227. ELSEIF nTest = 183
  228.    XSample_183()
  229. ELSEIF nTest = 184
  230.    XSample_184()
  231. ELSEIF nTest = 185
  232.    XSample_185()
  233. ELSEIF nTest = 186
  234.    XSample_186()
  235. ELSEIF nTest = 187
  236.    XSample_187()
  237. ELSEIF nTest = 188
  238.    XSample_188()
  239. ELSEIF nTest = 189
  240.    XSample_189()
  241. ELSEIF nTest = 190
  242.    XSample_190()
  243. ELSEIF nTest = 191
  244.    XSample_191()
  245. ELSEIF nTest = 192
  246.    XSample_192()
  247. ELSE
  248.    DC_WinAlert('This sample is available under eXPress++ 1.7 or later')
  249. ENDIF
  250.  
  251. DC_ClearEvents()
  252.  
  253. RETURN nil
  254.  
  255. * ---------------------------- *
  256.  
  257. STATIC FUNCTION XSample_Header( nTest )
  258.  
  259. nTest += 162
  260.  
  261. IF nTest = 163
  262.   RETURN "Keyboard"
  263. ELSEIF nTest = 164
  264.   RETURN "TypeAhead"
  265. ELSEIF nTest = 165
  266.   RETURN "Spin-Get"
  267. ELSEIF nTest = 166
  268.   RETURN "Change Get"
  269. ELSEIF nTest = 167
  270.   RETURN "Field Editor"
  271. ELSEIF nTest = 168
  272.   RETURN "Menu Replace"
  273. ELSEIF nTest = 169
  274.   RETURN "Folder"
  275. ELSEIF nTest = 170
  276.   RETURN ""
  277. ELSEIF nTest = 171
  278.   RETURN ""
  279. ELSEIF nTest = 172
  280.   RETURN ""
  281. ELSEIF nTest = 173
  282.   RETURN ""
  283. ELSEIF nTest = 174
  284.   RETURN ""
  285. ELSEIF nTest = 175
  286.   RETURN ""
  287. ELSEIF nTest = 176
  288.   RETURN ""
  289. ELSEIF nTest = 177
  290.   RETURN ""
  291. ELSEIF nTest = 178
  292.   RETURN ""
  293. ELSEIF nTest = 179
  294.   RETURN ""
  295. ELSEIF nTest = 180
  296.   RETURN ""
  297. ELSEIF nTest = 181
  298.   RETURN ""
  299. ELSEIF nTest = 182
  300.   RETURN ""
  301. ELSEIF nTest = 183
  302.   RETURN ""
  303. ELSEIF nTest = 184
  304.   RETURN ""
  305. ELSEIF nTest = 185
  306.   RETURN ""
  307. ELSEIF nTest = 186
  308.   RETURN ""
  309. ELSEIF nTest = 187
  310.   RETURN ''
  311. ELSEIF nTest = 188
  312.   RETURN ''
  313. ELSEIF nTest = 189
  314.   RETURN ''
  315. ELSEIF nTest = 190
  316.   RETURN ''
  317. ELSEIF nTest = 191
  318.   RETURN ''
  319. ELSEIF nTest = 192
  320.   RETURN ''
  321. ENDIF
  322.  
  323. RETURN ''
  324.  
  325. * ---------------------------- *
  326.  
  327. STATIC FUNCTION XSample_Color( nTest )
  328.  
  329. LOCAL lVer20
  330.  
  331. #ifdef EXPRESS20
  332.   lVer20 := .t.
  333. #else
  334.   lVer20 := .f.
  335. #endif
  336.  
  337. IF lVer20
  338.   RETURN GRA_CLR_BLACK
  339. ENDIF
  340.  
  341. nTest += 162
  342.  
  343. IF AScan({163,164,165,166,167,168},nTest) == 0
  344.   RETURN GRA_CLR_DARKGRAY
  345. ENDIF
  346.  
  347. RETURN GRA_CLR_BLACK
  348.  
  349. * -----------------
  350.  
  351. STATIC FUNCTION XSample_163()
  352.  
  353. /* This example shows how to use the Keyboard buffer
  354.    to enter data into a table of Gets */
  355.  
  356. LOCAL GetList[0], a, b, GetOptions, lTypeAhead := DC_ReadGuiTypeAhead(.t.)
  357.  
  358. a := "  "
  359. b := "   "
  360.  
  361. KEYBOARD '02' + chr(13) + '011'
  362.  
  363. @ 1,1 DCSAY "a" get a
  364. @ 2,1 DCSAY "b" get b
  365.  
  366. DCGETOPTIONS KEYBOARD ''
  367. DCREAD GUI FIT ADDBUTTONS MODAL TITLE 'Keyboard Test' ;
  368.   OPTIONS GetOptions
  369.  
  370. DC_ReadGuiTypeAhead(lTypeAhead)
  371.  
  372. RETURN nil
  373. *** END OF EXAMPLE ***
  374.  
  375. * ------------------
  376.  
  377. STATIC FUNCTION XSample_164( nRecur )
  378.  
  379. /* This example shows how to use TypeAhead to enter
  380.    data into a table of Gets.  */
  381.  
  382. LOCAL GetList[0], cGet := Space(30), GetOptions, ;
  383.       lTypeAhead := DC_ReadGuiTypeAhead(.t.)
  384.  
  385. DEFAULT nRecur := 0
  386.  
  387. @ 1,1 DCSAY 'Type Something' GET cGet SAYSIZE 0
  388.  
  389. @ 3,1 DCSAY 'Press the ALT-N key to invoke a new Window.;' + ;
  390.             'This will cause a 2 second delay before the;' + ;
  391.             'new window is painted.  Type some text during;' + ;
  392.             'this 2 seconds.  It should appear in the GET;' + ;
  393.             'of the new window' ;
  394.       SAYWORDBREAK ;
  395.       SAYSIZE 40,4
  396.  
  397. @ 8,1 DCPUSHBUTTON SIZE 20,2 CAPTION '&New Window' ;
  398.   ACTION {||Sleep(200),XSample_164(++nRecur)}
  399.  
  400. DCGETOPTIONS _CASCADE nRecur > 0
  401.  
  402. DCREAD GUI FIT MODAL OPTIONS GetOptions ;
  403.    SETAPPWINDOW TITLE 'Type-Ahead Test'
  404.  
  405. DC_ReadGuiTypeAhead(lTypeAhead)
  406.  
  407. RETURN nil
  408. *** END OF EXAMPLE ***
  409.  
  410. * -------------------
  411.  
  412. STATIC FUNCTION XSample_165()
  413.  
  414. /* This example shows how to create a custom Spin-Button
  415.    from a DCGET and two DCPUSHBUTTONs */
  416.  
  417. LOCAL GetList := {}, oSpin, nSpin := 0, lStartSpin := .f., oThread, ;
  418.       lThreadActive := .t., nMode := 0
  419.  
  420. oThread := Thread():new()
  421. oThread:start({||_Spin(@nMode,@nSpin,@oSpin,@lThreadActive,@lStartSpin)})
  422.  
  423. @ 0,0 DCSAY 'Spin Me' GET nSpin PICT '999.99' GETSIZE 82,26 PIXEL ;
  424.       GETOBJECT oSpin SAYSIZE 130 SAYRIGHTCENTER
  425.  
  426. @ 5,63 DCPUSHBUTTON CAPTION 't' SIZE 15,10 ;
  427.        FONT '10.Marlett';
  428.        PARENT oSpin ;
  429.        PIXEL ;
  430.        EVAL {|o|o:lbDown:= {||nMode:=1,lStartSpin:=.t.}, ;
  431.                 o:lbUp := {||nMode:=0} }
  432.  
  433. @ 15,63 DCPUSHBUTTON CAPTION 'u' SIZE 15,10 ;
  434.       FONT '10.Marlett' ;
  435.       PARENT oSpin ;
  436.       PIXEL ;
  437.       EVAL {|o|o:lbDown:= {||nMode:=2,lStartSpin:=.t.}, ;
  438.                o:lbUp := {||nMode:=0} }
  439.  
  440. DCREAD GUI FIT MODAL ADDBUTTONS TITLE 'Spin-Button in a DCGET'
  441.  
  442. lThreadActive := .f.
  443.  
  444. RETURN nil
  445.  
  446. * -----------------
  447.  
  448. STATIC FUNCTION _Spin( nMode, nSpin, oSpin, lThreadActive, lStartSpin )
  449.  
  450. LOCAL lStart := .t.
  451.  
  452. DO WHILE lThreadActive
  453.   IF nMode = 1 .AND. nSpin <= 10.0
  454.     nSpin += .1
  455.     oSpin:setData()
  456.   ELSEIF nMode = 2 .AND. nSpin >= -10.0
  457.     nSpin -= .1
  458.     oSpin:setData()
  459.   ENDIF
  460.   IF lStartSpin
  461.     Sleep(30)
  462.     lStartSpin := .f.
  463.   ELSE
  464.     Sleep(10)
  465.   ENDIF
  466. ENDDO
  467.  
  468. RETURN nil
  469. *** END OF EXAMPLE ***
  470.  
  471. * --------------------
  472.  
  473. STATIC FUNCTION XSample_166()
  474.  
  475. /* This example shows two different techiques for updating
  476.    the value of a GET from a VALID function */
  477.  
  478. LOCAL GetList := {}, GetOptions, cFirstName, cLastName, lOk
  479.  
  480. cFirstName := Space(30)
  481. cLastName := Space(30)
  482.  
  483. @ 02,05 DCSAY "First name" GET cFirstName ;
  484.    SAYSIZE 0 SAYFONT "10.Courier" GETFONT "10.Courier" ;
  485.    VALID {|| CenterIt1(@cFirstName,GetList)}
  486.  
  487. @ 04,05 DCSAY "Last name " GET cLastName ;
  488.    SAYSIZE 0 SAYFONT "10.Courier" GETFONT "10.Courier" ;
  489.    VALID {|oGet| CenterIt2(@cLastName,oGet)}
  490.  
  491. DCREAD GUI ;
  492.     MODAL ;
  493.     FIT ;
  494.     ADDBUTTONS ;
  495.     TITLE 'Change GET contents in Valid' ;
  496.     TO lOk
  497.  
  498. IF (lOk)
  499.    DCMSGBOX "|"+cFirstName+"|"+cLastName+"|"
  500. ENDIF
  501.  
  502. RETURN(NIL)
  503.  
  504. * ----------------
  505.  
  506. FUNCTION CenterIt1(cName,GetList)
  507.  
  508. cName:=ALLTRIM(cName)
  509. cName:=PADC(cName,30)
  510. DC_GetRefresh(GetList)
  511.  
  512. RETURN(.T.)
  513.  
  514. * ----------------
  515.  
  516. FUNCTION CenterIt2(cName,oGet)
  517.  
  518. cName:=ALLTRIM(cName)
  519. cName:=PADC(cName,30)
  520. oGet:setData()
  521.  
  522. RETURN(.T.)
  523. *** END OF EXAMPLE ***
  524.  
  525. * ---------------------
  526.  
  527. STATIC FUNCTION XSample_167()
  528.  
  529. /*
  530. Field Editor
  531.  
  532. This sample uses DCAPPEDIT and DCAPPFIELD to create an Editor for
  533. ALL FIELDS in a database.
  534. */
  535.  
  536.  LOCAL GetList := {}, oStatic, oAppEdit, i, aFields, cField
  537.  
  538.  USE COLLECT VIA DBFNTX NEW SHARED
  539.  
  540.  @  0,0 DCSTATIC XBPSTATIC_TYPE_RAISEDBOX SIZE 78,18.5 ;
  541.     OBJECT oStatic
  542.  
  543.  DCAPPEDIT INTO oAppEdit STYLE 3D POSITION 0,0 PARENT oStatic
  544.  
  545.  aFields := dbStruct()
  546.  
  547.  FOR i := 1 TO Len(aFields)
  548.     cField := '{||COLLECT->' + aFields[i,1] + '}'
  549.     DCAPPFIELD '' INTO oAppEdit ;
  550.     CAPTION aFields[i,1] ;
  551.     COLOR GRA_CLR_BLUE
  552.     ATail(GetList)[bGETLIST_VAR] := &(cField)
  553.  NEXT
  554.  
  555.  DCREAD GUI ;
  556.    TITLE 'Application Edit Demo' ;
  557.    FIT ;
  558.    MODAL ;
  559.    BUTTONS DCGUI_BUTTON_EXIT
  560.  
  561. RETURN nil
  562. *** END OF EXAMPLE ***
  563.  
  564. * ---------------------
  565.  
  566. STATIC FUNCTION XSample_168()
  567.  
  568. /* This example shows how to replace a complete menu system
  569.    within a dialog with a new menu at runtime */
  570.  
  571. LOCAL GetList:={}, dDate := Date(), cString := Space(10), oDialog
  572.  
  573. @ 0,0 DCGET dDate
  574. @ 1,0 DCGET cString
  575.  
  576. @ 3,0 DCPUSHBUTTON CAPTION 'Main Menu' SIZE 50,2 ;
  577.    ACTION {||MenuBar( 1, nil ,oDialog ) }
  578.  
  579. @ 5,0 DCPUSHBUTTON CAPTION 'Utility Menu' SIZE 50,2 ;
  580.    ACTION {||MenuBar( 2, nil ,oDialog ) }
  581.  
  582. @ 7,0 DCPUSHBUTTON CAPTION 'Backup Menu' SIZE 50,2 ;
  583.    ACTION {||MenuBar( 3, nil ,oDialog ) }
  584.  
  585. MenuBar( 1, GetList )
  586.  
  587. DCREAD GUI ;
  588.    MODAL ;
  589.    TITLE 'Replacing a Menu System' ;
  590.    FIT ;
  591.    PARENT @oDialog
  592.  
  593. RETURN nil
  594.  
  595. * ----------
  596.  
  597. FUNCTION MenuBar( nMenu, GetList, oDialog )
  598.  
  599. LOCAL oMenuBar, oSubMenu1, oSubMenu2
  600.  
  601. IF Valtype(oDialog) == 'O'
  602.   GetList := Array(0)
  603.   oMenuBar := XbpMenuBar():new( oDialog ):create()
  604. ELSE
  605.   DCMENUBAR oMenuBar
  606. ENDIF
  607.  
  608. IF nMenu == 1
  609.  
  610.   DCSUBMENU oSubMenu1 PROMPT 'Main Sub Menu 1' PARENT oMenuBar
  611.  
  612.     DCMENUITEM 'Main Menu item 1' PARENT oSubMenu1 ;
  613.       ACTION {||Msgbox('Main Menu Item 1')}
  614.  
  615.   DCSUBMENU oSubMenu2 PROMPT 'Main Sub Menu 2' PARENT oMenuBar
  616.  
  617.     DCMENUITEM 'Main Menu item 2' PARENT oSubMenu2 ;
  618.       ACTION {||Msgbox('Main Menu Item 2')}
  619.  
  620. ELSEIF nMenu == 2
  621.  
  622.   DCSUBMENU oSubMenu1 PROMPT 'Utility Sub Menu 1' PARENT oMenuBar
  623.  
  624.     DCMENUITEM 'Utility Menu item 1' PARENT oSubMenu1 ;
  625.       ACTION {||Msgbox('Utility Menu Item 1')}
  626.  
  627.   DCSUBMENU oSubMenu2 PROMPT 'Utility Sub Menu 2' PARENT oMenuBar
  628.  
  629.     DCMENUITEM 'Utility Menu item 2' PARENT oSubMenu2 ;
  630.       ACTION {||Msgbox('Utility Menu Item 2')}
  631.  
  632. ELSEIF nMenu == 3
  633.  
  634.   DCSUBMENU oSubMenu1 PROMPT 'Backup Sub Menu 1' PARENT oMenuBar
  635.  
  636.     DCMENUITEM 'Backup Menu item 1' PARENT oSubMenu1 ;
  637.       ACTION {||Msgbox('Backup Menu Item 1')}
  638.  
  639.   DCSUBMENU oSubMenu2 PROMPT 'Backup Sub Menu 2' PARENT oMenuBar
  640.  
  641.     DCMENUITEM 'Backup Menu item 2' PARENT oSubMenu2 ;
  642.       ACTION {||Msgbox('Backup Menu Item 2')}
  643.  
  644.     DCMENUITEM 'Backup Menu item 2' PARENT oSubMenu2 ;
  645.       ACTION {||Msgbox('Backup Menu Item 3')}
  646.  
  647. ENDIF
  648.  
  649. IF Valtype(oDialog) == 'O'
  650.   DCREAD GUI ;
  651.     EXIT ;
  652.     PARENT oDialog
  653. ENDIF
  654.  
  655. RETURN nil
  656. *** END OF EXAMPLE ***
  657.  
  658. * ---------------------
  659.  
  660. STATIC FUNCTION XSample_169()
  661.  
  662. /* This example shows how to create a Windows-style folder
  663.    window with scrollable icons */
  664.  
  665. LOCAL aGetList[0], aFolder
  666.  
  667. RETURN nil
  668.  
  669. *** END OF EXAMPLE ***
  670.  
  671. * ---------------------
  672.  
  673. STATIC FUNCTION XSample_170()
  674.  
  675. RETURN nil
  676. *** END OF EXAMPLE ***
  677.  
  678. * --------------------
  679.  
  680. STATIC FUNCTION XSample_171()
  681.  
  682. RETURN nil
  683. *** END OF EXAMPLE ***
  684.  
  685. * ---------------------
  686.  
  687. STATIC FUNCTION XSample_172()
  688.  
  689. RETURN nil
  690. *** END OF EXAMPLE ***
  691.  
  692. * ---------------------
  693.  
  694. STATIC FUNCTION XSample_173()
  695.  
  696. RETURN nil
  697. *** END OF EXAMPLE ***
  698.  
  699. * --------------------
  700.  
  701. STATIC FUNCTION XSample_174()
  702.  
  703. RETURN nil
  704. *** END OF EXAMPLE ***
  705.  
  706. * --------------------
  707.  
  708. STATIC FUNCTION XSample_175()
  709.  
  710. RETURN nil
  711. *** END OF EXAMPLE ***
  712.  
  713. * --------------------
  714.  
  715. STATIC FUNCTION XSample_176()
  716.  
  717. RETURN nil
  718. *** END OF EXAMPLE ***
  719.  
  720. * ---------------------
  721.  
  722. STATIC FUNCTION XSample_177()
  723.  
  724. RETURN nil
  725. *** END OF EXAMPLE ***
  726.  
  727. * ---------------------
  728.  
  729. STATIC FUNCTION XSample_178()
  730.  
  731. RETURN nil
  732. *** END OF EXAMPLE ***
  733.  
  734. * ---------------------
  735.  
  736. STATIC FUNCTION XSample_179()
  737.  
  738. RETURN nil
  739. *** END OF EXAMPLE ***
  740.  
  741. * ---------------------
  742.  
  743. STATIC FUNCTION XSample_180()
  744.  
  745. RETURN nil
  746. *** END OF EXAMPLE ***
  747.  
  748. * ---------------------
  749.  
  750. STATIC FUNCTION XSample_181()
  751.  
  752. RETURN nil
  753. *** END OF EXAMPLE ***
  754.  
  755. * ---------------------
  756.  
  757. STATIC FUNCTION XSample_182()
  758.  
  759. RETURN nil
  760. *** END OF EXAMPLE ***
  761.  
  762. * ---------------------
  763.  
  764. STATIC FUNCTION XSample_183()
  765.  
  766. RETURN nil
  767. *** END OF EXAMPLE ***
  768.  
  769. * ---------------------
  770.  
  771. STATIC FUNCTION XSample_184()
  772.  
  773. RETURN nil
  774. *** END OF EXAMPLE ***
  775.  
  776. * ---------------------
  777.  
  778. STATIC FUNCTION XSample_185()
  779.  
  780. RETURN nil
  781. *** END OF EXAMPLE ***
  782.  
  783. * ---------------------
  784.  
  785. STATIC FUNCTION XSample_186()
  786.  
  787. RETURN nil
  788. *** END OF EXAMPLE ***
  789.  
  790. * ---------------------
  791.  
  792. STATIC FUNCTION XSample_187()
  793.  
  794. RETURN nil
  795. *** END OF EXAMPLE ***
  796.  
  797. * ---------------------
  798.  
  799. STATIC FUNCTION XSample_188()
  800.  
  801. RETURN nil
  802. *** END OF EXAMPLE ***
  803.  
  804. * ---------------------
  805.  
  806. STATIC FUNCTION XSample_189()
  807.  
  808. RETURN nil
  809. *** END OF EXAMPLE ***
  810.  
  811. * ---------------------
  812.  
  813. STATIC FUNCTION XSample_190()
  814.  
  815. RETURN nil
  816. *** END OF EXAMPLE ***
  817.  
  818. * ---------------------
  819.  
  820. STATIC FUNCTION XSample_191()
  821.  
  822. RETURN nil
  823. *** END OF EXAMPLE ***
  824.  
  825. * ---------------------
  826.  
  827. STATIC FUNCTION XSample_192()
  828.  
  829. RETURN nil
  830. *** END OF EXAMPLE ***
  831.  
  832.  
  833.