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

Home » Public Forums » archive » Can I make entries in CW_PDMENU insensitive?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Can I make entries in CW_PDMENU insensitive? [message #14475 is a reply to message #14397] Tue, 02 March 1999 00:00 Go to previous message
David Foster is currently offline  David Foster
Messages: 341
Registered: January 1996
Senior Member
David Fanning wrote:
>
> Steffen Luesse (luesse@rad.uni-kiel.de) writes:
>
>> I am using IDL 5.2 on solaris 2.6. I want to use the CW_PDMENU routine
>> to create a pull-down menu in my widget programs. In principle,
>> everything works well. However, I am wondering if it is possible to make
>> some menu entries insensitive like I can do it with buttons or sliders
>> when they should not be used. I did not find any information about my
>> problem in the IDL documentation and would appreciate if anybody could
>> give me a hint.
>
> CW_PDMENU sounds like a good idea until you actually start
> writing a widget program. Then you find you want to make
> a button insensitive, or you want to assign a special event
> handler to a button, or you want to put something in the
> user value of a button, or whatever it is, and CW_PDMENU
> doesn't let you do it.
>
> At this point you can either hack the CW_PDMENU code (ugh!), or
> you can do what I do and use the trivially easy solution of
> setting the MENU keyword on button widgets to create your
> own pull-down menus.

David -

I agree that creating pulldown menus using the /MENU keyword to
WIDGET_BUTTON() calls is very easy, and makes your code easier
to read and maintain (especially your event handler!).

But all of the limitations of CW_PDMENU mentioned above can be
overcome by using the IDS= keyword to return a vector of the
widget IDs for the buttons, and then using WIDGET_CONTROL to
manage these widgets (eg. make insensitive, assign an event-handler,
set the uvalue, etc.).

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
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: INSIGHT 3D Visualization ?
Next Topic: Map of the Moon's surface

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

Current Time: Wed Oct 08 18:38:48 PDT 2025

Total time taken to generate the page: 0.00439 seconds