home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 18 REXX / 18-REXX.zip / rxdlg11.zip / text.cmd < prev    next >
OS/2 REXX Batch file  |  1995-03-01  |  2KB  |  69 lines

  1. /* Trap ERROR and FAILURE */
  2. SIGNAL ON ERROR
  3. SIGNAL ON FAILURE
  4.  
  5. /* This demos using TEXT Groups */
  6.  
  7. /* ====================== 'Main Window' ======================= */
  8. /* First Group will be 3 lines of centered text with a groupbox */
  9. RXTYPE.1 = 'TEXT'
  10.  
  11. /* Center the text */
  12. RXFLAGS.1 = 'CENTER'
  13.  
  14. /* Text lines */
  15. RXLABEL.1 = 'PLEASE READ!|This is a REXX example of|centered text.|Text Stuff'
  16.  
  17. /* TotalPhrases, PhrasesPerLine, WidthOfPhrase, BetweenPhrases */
  18. RXINFO.1 = '3 1 0 0'
  19.  
  20. /* Position */
  21. RXX.1 = 10
  22. RXY.1 = 10
  23.  
  24.  
  25. /* Second Group will show how to setup 3 columns with headings of "First",
  26.     Second", and "Third", and then put the values 0 and 1 under First, 2 and
  27.     3 under Second, and 4 and 5 under Third. We set BetweenPhrases to
  28.     the desired space between columns. Since we want 3 columns, PhrasesPerLine
  29.     is 3. Then, the order of label string goes by rows (ie, the 3 headings, and the
  30.     first values for the 3 headings, then the second values for the 3 headings).
  31.     Finally, we put a group box labelled "Chart" */
  32. RXTYPE.2 = 'TEXT'
  33.  
  34. /* Center the text */
  35. RXFLAGS.2 = 'CENTER'
  36.  
  37. /* Text lines */
  38. RXLABEL.2 = 'First|Second|Third|0|2|4|1|3|5|Chart'
  39.  
  40. /* TotalPhrases, PhrasesPerLine, WidthOfPhrase, BetweenPhrases */
  41. RXINFO.2 = '9 3 0 10'
  42.  
  43. /* Position */
  44. RXX.2 = 10
  45. RXY.2 = 100
  46.  
  47. /* Default size and position (also gives us sizing and max button) */
  48. RXWINMAIN = ' '
  49. RXDLG 2 '"Main Window"' 'RXWINMAIN' 'RESULT'
  50.  
  51. /* Do user interaction */
  52. RXDLG
  53.  
  54. /* ========================== Done ========================== */
  55. EXIT
  56.  
  57. FAILURE:
  58.     /* NOTE: the variable RC contains the returned error message (not a number,
  59.     unless we use RXERR to set up Rexx Dialog to return error numbers instead).
  60.     Because we used the default severity level, Rexx Dialog has already displayed
  61.     this error message to the enduser */
  62.     EXIT
  63. ERROR:
  64.     /* NOTE: the variable RC contains the returned error message (not a number,
  65.     unless we use RXERR to set up Rexx Dialog to return error numbers instead).
  66.     Because we used the default severity level, Rexx Dialog has already displayed
  67.     this error message to the enduser */
  68.     EXIT
  69.