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

Home » Public Forums » archive » CW_PDMENU, changing
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: CW_PDMENU [message #15001 is a reply to message #8923] Tue, 13 April 1999 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Pavel Romashkin (pavel@terra.colorado.edu) writes:

> Have you noticed that, when creating widget applications with top-level
> pulldown menus, if you use CW_PDMENU for creating menus, then there's no
> way to use the 1st child of the top base (which is the menu bar base) to
> carry the widget STATE information, because UVAL of all CW_PDMENUs and
> the menu bar are reset to the last CW_PDMENU's UVALUE? I have asked
> RSInc about it and they said this is because CW_PDMENU uses the menu bar
> as a base (since menu bar can only have buttons as children). They said
> they are not likely to alter this behavior for the sake of backward
> compatibility. I worked around this by using WIDGET_BUTTONS on the menu
> bar, and populating them with CW_PDMENUs. How did you get around this?

I get around it by not using CW_PDMENU at all. I just create
buttons. This gives me great flexibility in assigning
event handlers, moving buttons around in my interface,
adding new buttons, etc. If I want new functionality
in my program I just create a new button, assign it
an event handler, write the event handler and I am done
with it. I don't have to worry about breaking code I've
already written, etc.

If I want one event handler to handle all the button events
in a pull-down menu, I just assign the event handler to the
button at the top of the button hierarchy. The sub-button events
"bubble up" to the correct event handler.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: CDF question
Next Topic: Stupid Question#1

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

Current Time: Sun Oct 12 13:37:39 PDT 2025

Total time taken to generate the page: 0.56064 seconds