Re: Checked Entries in a GUI Pulldown menu [message #40825] |
Thu, 02 September 2004 09:37 |
Antonio Santiago
Messages: 201 Registered: February 2004
|
Senior Member |
|
|
With WIDGET_INFO :)
Florian Meyer wrote:
> Hi,
> I have a Problem checking and unchecking Entries in a Pulldownmenu.
> I created a pulldownmenu like this:
>
> tlb=WIDGET_BASE(/TLB_KILL_REQUEST_EVENTS,mbar=menu)
> butid=WIDGET_BUTTON(pdRegelung,value='xy',uvalue='xy',/CHECK ED_MENU)
>
> In the Eventhandler IDL jumps to 'XY' via a CASE comand, when the
> Button is pressed:
>
> 'XY': begin
> widget_control,info1.butspritzenregid,/set_button
> end
>
> Then the Button is checked.....
> So far it works as I want, but how can I...
> 1) Uncheck the Button ??
> 2) Read out if it is checked or not???
>
> It remains checked, even when I press it again, and the event.select
> value always is 1.
>
> Thanks for helping!
> Bye
> Florian
|
|
|
Re: Checked Entries in a GUI Pulldown menu [message #40829 is a reply to message #40825] |
Thu, 02 September 2004 08:51  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Florian Meyer writes:
> I have a Problem checking and unchecking Entries in a Pulldownmenu.
> I created a pulldownmenu like this:
>
> tlb=WIDGET_BASE(/TLB_KILL_REQUEST_EVENTS,mbar=menu)
> butid=WIDGET_BUTTON(pdRegelung,value='xy',uvalue='xy',/CHECK ED_MENU)
>
> In the Eventhandler IDL jumps to 'XY' via a CASE comand, when the
> Button is pressed:
>
> 'XY': begin
> widget_control,info1.butspritzenregid,/set_button
> end
>
> Then the Button is checked.....
> So far it works as I want, but how can I...
> 1) Uncheck the Button ??
> 2) Read out if it is checked or not???
>
> It remains checked, even when I press it again, and the event.select
> value always is 1.
Here is an article and access to an example program:
http://www.dfanning.com/widget_tips/checkmarks.html
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|