Re: CW_PDMENU, changing [message #8927 is a reply to message #8923] |
Fri, 09 May 1997 00:00   |
agraps
Messages: 35 Registered: September 1994
|
Member |
|
|
"R. Bauer" <r.bauer@fz-juelich.de> writes:
> I have created a fine pull down menu.
> The * means that's the default.
> I like to set the * to 'PS file' if that was choosen.
> How can I do this?
It would be neat if there were a "checked" option of the menu items.
I manually check the UVALUE in my event loop and check and uncheck the
menu items based on that. There's probably a fancier way.
But, here is an example of what I do manually with checking and
unchecking menu items.
;Create Diagnostics Menu
switch_menu = WIDGET_BUTTON(bar_base, Value='Diagnostics', /Menu)
switch_bttn3 = WIDGET_BUTTON(switch_menu, Value='*Time Simulation', $
Uvalue='*Time Simulation')
switch_bttn4 = WIDGET_BUTTON(switch_menu, Value='*Beep When Done', $
Uvalue='*Beep When Done')
Then part of my event loop looks like:
CASE eventval OF
; These menu items act like a toggle switch using '*'
'*Time Simulation': BEGIN
WIDGET_CONTROL, event.id, set_value = 'Time Simulation', $
set_uvalue = 'Time Simulation'
END ; '*Time Simulation'
'*Beep When Done': BEGIN
WIDGET_CONTROL, event.id, set_value = 'Beep When Done', $
set_uvalue = 'Beep When Done'
END ; '*Beep When Done'
'Time Simulation': BEGIN
WIDGET_CONTROL, event.id, set_value = '*Time Simulation', $
set_uvalue = '*Time Simulation'
END ; 'Time Simulation'
'Beep When Done': BEGIN
WIDGET_CONTROL, event.id, set_value = '*Beep When Done', $
set_uvalue = '*Beep When Done'
END ; 'Beep When Done'
ENDCASE
viel Glueck!
Amara
--
************************************************************ *************
Amara Graps email: agraps@netcom.com
Computational Physics vita: finger agraps@best.com
Multiplex Answers URL: http://www.amara.com/
************************************************************ *************
|
|
|