LIBRARY rexxgui
guierr = "SYNTAX"
guiheading = 1
DO
MACRO utilities
CATCH SYNTAX
NOP
END
rc = pre_create_window()
IF rc = 1 THEN
RETURN
guicreatewindow()
rc = post_create_window()
guisetctlvalue()
guisetctlplacement(,,,,,,'NORMAL')
again:
DO FOREVER
guigetmsg()
IF EXISTS('GuiObject') == 0 THEN
DO
IF EXISTS('GuiSignal') THEN
DO
SELECT guisignal
WHEN 'CLOSE' THEN
LEAVE
WHEN 'OTHER_OPTION' THEN
NOP
OTHERWISE
NOP
END
END
END
ELSE
DO
rc = determine_child_request()
END
CATCH SYNTAX
err = CONDITION('E')
IF err <> 109 THEN
DO
CONDITION('M')
SIGNAL again
END
CATCH HALT
guidestroywindow()
END
RETURN
determine_child_request:
RETURN 0
pre_create_window:
RETURN 0
post_create_window:
statusbarwidths.1 = 150
statusbarwidths.2 = -1
guiaddctltext('status_bar', 2, 'statusbarwidths')
status_bar = 'Default database is unknown'
guisetctlvalue('status_bar', 1 )
rc = change_db2_source.rex("I")
RETURN 0
odbc_source.1:
SAY "We chose DB2 source.1"
rc = db2_menu_changed(1)
RETURN
odbc_source.2:
SAY "We chose DB2 source.2"
rc = db2_menu_changed(2)
RETURN
odbc_source.3:
SAY "We chose DB2 source.3"
rc = db2_menu_changed(3)
RETURN
odbc_source.4:
SAY "We chose DB2 source.4"
rc = db2_menu_changed(4)
RETURN
db2_menu_changed:
ARG menu_position
rc = change_db2_source.rex("C", menu_position)
RETURN 0
wm_close:
RETURN |