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

Home » Public Forums » archive » Re: Check mark on menu bar pull down item?
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: Check mark on menu bar pull down item? [message #14154] Tue, 26 January 1999 00:00
David Foster is currently offline  David Foster
Messages: 341
Registered: January 1996
Senior Member
Eric Frans wrote:
>
> Hello IDL folks,
>
> I have looked through the documentation for IDL 5.1 and can't seem to
> find any mention of how to display a check mark next to a pull down item
> from a menu bar. It looks like IDL leaves room on the left of menu bar
> pull down items for this purpose, but I can't figure out how to
> implement it. I hope this is possible because it would be a lot slicker
> than having to use check boxes in the main widget area to indicate that
> certain options are on or off.
>
> As always, thanks in advance for any help!
>
> - Eric Frans

One easy way around this problem is to leave extra space at the
beginning of the text for the VALUE keyword for each button (the
text displayed in the pulldown menu), and then later change the
text so it begins with '*' or whatever character you like:

button = WIDGET_BUTTON(base, VALUE=' This is the first button', ...

and then later when you want to "check" this menu button:

widget_control, button, get_value=button_string
str = ' * ' ; or str = ' ' to "uncheck"
strput, button_string, str, 0
widget_control, button, set_value=button_string

Since checking/unchecking usually means a toggle of some kind, this is
pretty straightforward.

Dave
--

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
David S. Foster Univ. of California, San Diego
Programmer/Analyst Brain Image Analysis Laboratory
foster@bial1.ucsd.edu Department of Psychiatry
(619) 622-5892 8950 Via La Jolla Drive, Suite 2240
La Jolla, CA 92037
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL Library Browser
Next Topic: Re: Concurrent CORBA calls

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

Current Time: Wed Oct 08 15:13:42 PDT 2025

Total time taken to generate the page: 0.00456 seconds