comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: checked menu bars - not toggling on / off
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: checked menu bars - not toggling on / off [message #60868] Wed, 18 June 2008 06:25
Chris Jengo is currently offline  Chris Jengo
Messages: 13
Registered: July 1999
Junior Member
Quick answer is that set_button=1 will add a check, and set_button=0
will uncheck it. /set_button is the same as saying set_button=1, so
you're just adding the check each time (not toggling it).

Chris
Re: checked menu bars - not toggling on / off [message #60878 is a reply to message #60868] Tue, 17 June 2008 13:27 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
cgoethel@igpp.ucla.edu writes:

> How does the toggle button on the checked menu button work? I believe
> I have properly set up the tlb, menu widget button, and checked menu
> button, least ways it initially displays correctly with a check mark
> next to that menu item. However, when I click on that menu item, to
> turn it off, the pulldown menu display is not updated (to not have a
> check). I do get an event and I call widget_control ...
>
> WIDGET_CONTROL, event.id, /set_button
>
> From the documentation, it looked like this should work as a toggle
> button. I took that to mean that each time widget_control was called
> with the /set_button keyword the value would change from 0 to 1. In
> debugging, when I call widget_info - the value is always 1. What do I
> need to do to set this button to 0 or 1?

Here is an article that explains the whole process:

http://www.dfanning.com/widget_tips/checkmarks.html

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: IDL starting.
Next Topic: Re: How to print from an iTool? In color.

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:39:44 PDT 2025

Total time taken to generate the page: 0.00590 seconds