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

Home » Public Forums » archive » Re: Strange widget question
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: Strange widget question [message #13964 is a reply to message #13950] Sat, 19 December 1998 00:00 Go to previous message
davidf is currently offline  davidf
Messages: 2866
Registered: September 1996
Senior Member
Dyer Lytle (dyer@lpl.arizona.edu) writes:

> I am trying to use pull-down menus in a way for which they
> were never intended and am failing miserably. I have a draw
> widget containing text areas and I want the user to easily change
> the text in any particular area by clicking on that area and having
> a menu of possible values pop up any one of which could be selected
> by moving the mouse to it and releasing the mouse button.
>
> The way I tried to do this was to use a bulletin-board base with
> pull-down
> menu buttons hiding under the draw widget. Then when the user
> clicks on the draw widget, I catch the event, decide which pull-down
> menu I need and send an event to the appropriate button. I haven't
> been able to activate the menu this way. How do I tell a button to
> push itself? Any one have an alternative way to do this?

If I understand this question correctly you want to send
an event to the root of the pull-down menu so that
the pull-down menu is display (pulled down). Is that
correct?

If so, I think you are completely out of luck. Menu
buttons (any button in the menu bar or buttons with the
MENU keyword set for them don't generate events and
can't respond to events that are sent to them. (You
can send events to widgets with WIDGET_CONTROL and
the SEND_EVENT keyword.) The response of a pull-down
menu button is entirely window manager driven and has
nothing to do with anything you can control in IDL.

Of course, it is entirely possible to have a pull-down
menu button *appear* when you click in the draw widget.
But the user will have to click on the button to display
the menu themselves. (I used to be fond of this "hidden
menu" technique, but for some reason it's fallen out of
favor with me. I used to like to pop-up the pull-down
menu right under where the user clicked.)

Cheers,

David

P.S. Just as an aside, I am suppose to be in the
Tucson area in January teaching the programming techniques
that I favor most *these* days. We have room for a few more
people in this class, if you are interested. :-)

--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Progamming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: problem printing color line plots on HP printer
Next Topic: Re: EXECUTE limits?

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

Current Time: Fri Oct 10 10:37:32 PDT 2025

Total time taken to generate the page: 0.79953 seconds