I sent this offline while the forum was down, but I'll append it here as well so anyone else can potentially find it. Preset a toggle menu item, then try and "switch off" the toggle
LIBRARY rexxgui
guierr = "SYNTAX"
guiheading = 1
guicreatewindow()
rc = post_create_window()
guisetctlvalue()
guisetctlplacement(,,,,,,'NORMAL')
again:
DO FOREVER
guigetmsg()
IF EXISTS('GuiObject') == 0 THEN DO
IF EXISTS('GuiSignal') THEN DO
END
END
ELSE DO
IF EXISTS('GuiSignal') == 0 THEN DROP (guiobject)
ELSE SELECT guiobject
WHEN 0 THEN NOP
OTHERWISE
END
END
CATCH SYNTAX
CONDITION()
SIGNAL again
CATCH HALT
FINALLY
guidestroywindow()
END
RETURN
post_create_window:
guisetmenuopts('toggle_on_off', 'MARK')
RETURN 0
|