the extra style INDEX leads to an error in GUICREATE: GUI
mytab = "One"
twocheck1 = 1
myoldtab = "One"
OPTIONS "C_CALL LABELCHECK"
LIBRARY rexxgui
guierr = "SYNTAX"
guiheading = 1
guicreatewindow()
addtabctls()
guisetctlplacement(,,,,,,'NORMAL')
again:
DO FOREVER
guigetmsg()
CATCH SYNTAX
CONDITION('M')
SIGNAL again
CATCH HALT
FINALLY
guidestroywindow()
END
RETURN
wm_click_onepush:
guisay("Button clicked")
RETURN
wm_selchange_mytab:
guigetctlvalue("MyTab")
removetabctls()
addtabctls()
myoldtab = mytab
RETURN
removetabctls:
SELECT myoldtab
WHEN "One" THEN DO
guigetctlvalue("OneEntry")
guigetctlvalue("OnePush")
guiremovectl("OneEntry")
guiremovectl("OnePush")
END
WHEN "Two" THEN DO
guigetctlvalue("TwoCheck1")
guigetctlvalue("TwoCheck2")
guigetctlvalue("TwoCheck3")
guigetctlvalue("TwoCheck4")
guiremovectl("TwoCheck1")
guiremovectl("TwoCheck2")
guiremovectl("TwoCheck3")
guiremovectl("TwoCheck4")
END
WHEN "Three" THEN DO
guigetctlvalue("ThreeList")
guiremovectl("ThreeList")
END
OTHERWISE
END
addtabctls:
SELECT mytab
WHEN "One" THEN DO
guiaddctl("ENTRY 10,20,176,14, TABSTOP, CLIENTEDGE|QUIET, OneEntry")
guiaddctl("PUSH 76,40,50,16, DEFAULT|TABSTOP, , OnePush, , Ok")
END
WHEN "Two" THEN DO
guiaddctl("CHECK 10,24,50,14, AUTO, QUIET, TwoCheck1, , Option 1")
guiaddctl("CHECK 70,24,50,14, AUTO, QUIET, TwoCheck2, , Option 2")
guiaddctl("CHECK 10,44,50,14, AUTO, QUIET, TwoCheck3, , Option 3")
guiaddctl("CHECK 70,44,50,14, AUTO, QUIET, TwoCheck4, , Option 4")
END
WHEN "Three" THEN DO
guiaddctl("LIST 10,20,176,90, TABS|BORDER, CLIENTEDGE|QUIET, ThreeList,, ListStrings")
END
END
RETURN
|