Guidance
指路人
g.yi.org
Software / Reginald / Examples / Text.rex

Register 
新用户注册
Search 搜索
首页 
Home Home
Software
Upload

  
/* This demos using TEXT Groups */

ADDRESS null

/* Trap HALT and SYNTAX in any scripts we call which don't
 * trap HALT or SYNTAX themselves.
 */
OPTIONS 'TRAP'

/* Trap SYNTAX/ERROR/HAT, and ask for ERROR raising */
SIGNAL ON HALT
SIGNAL ON SYNTAX
SIGNAL ON ERROR
CALL RXERR('ERROR|DISPLAY')



/* ====================== 'Main Window' ======================= */
/* First Group will be 3 lines of centered text with a groupbox */
rxtype.1 = 'TEXT'

/* Center the text */
rxflags.1 = 'CENTER|NOBORDER'

/* Text lines */
rxlabel.1 = 'PLEASE READ!|This is a REXX example of|centered text.|Text Stuff'

/* ControlsPerLine, X Position, Y Position, Width=0, BetweenPhrases=0 */
rxpos.1 = '1 10 20'


/* Second Group will show how to setup 3 columns with headings of "First",
 * Second", and "Third", and then put the values 0 and 1 under First, 2 and
 * 3 under Second, and 4 and 5 under Third. We set BetweenPhrases to
 * the desired space between columns. Since we want 3 columns, PhrasesPerLine
 * is 3. Then, the order of label string goes by rows (ie, the 3 headings, and the
 * first values for the 3 headings, then the second values for the 3 headings).
 * Finally, we put a group box labeled "Chart"
 */
rxtype.2 = 'TEXT'

/* Center the text */
rxflags.2 = 'CENTER'

/* Text lines */
rxlabel.2 = 'First|Second|Third|1|3|5|2|4|6|Chart'

/* ControlsPerLine (PhrasesPerLine), X Position, Y Position, Width=0, BetweenPhrases=0 */
rxpos.2 = '3 14 100'

/* Default size and position */
rx = ''
CALL RXCREATE('RX', 2, 'Main Window', 'RESULT|MIN')

/* Do user interaction */
CALL RXMSG()

/* ========================== Done ========================== */
EXIT




/* ==================== Error Handling ====================== */
syntax:
    CALL RXSAY(CONDITION('D') || '0D0A0D0A'x || SOURCELINE(sigl),,'Error '||condition('E')||' at line '||sigl)

halt:
error:
    /* NOTE: CONDITION('D') fetches error message. CONDITION('E') fetches the
     * error number. SIGL is the line number where the error occurred.
     * Rexx Dialog has already displayed a message since we specified DISPLAY
     * option.
     */
    CALL RXMSG(,'END')
    EXIT
掌柜推荐
 
 
 
 
 
 
 
 
 
 
 
 
© Sat 2017-6-24  Guidance Laboratory Inc.
Email:webmaster1g.yi.org Hits:0 Last modified:2013-06-18 23:35:24