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

Home » Public Forums » archive » Re: Menu 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: Menu Question [message #67299 is a reply to message #67296] Sun, 12 July 2009 16:51 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Eric Hudson writes:

> I am having issues with menus and am hoping someone has a suggestion.
> Basically, I want a context menu look and functionality, with the
> ability to have accelerators (any idea why accelerators are forbidden
> for context menus?)

I think this is one of the 3 or 4 "Mysteries of the Universe",
if I'm not mistaken.

> I've tried just making a button group where each button spawns a
> pulldown menu (like what you get with CW_PDMENU) but it seems that the
> top level buttons can't have accelerators (while any button in the
> pulldown menus can).
>
> So then I thought I'd be clever and have a single top level button
> which I then programmatically 'push' in order to automatically drop
> down the menu. That is, I capture the right click on the draw window
> which says "time for a menu" then I show the top level base of my
> menu, with one button in it, and then tell the button to 'drop down
> your menu' without forcing the user to make the extra mouse click.
> But I can't figure out how to programmatically push the button -- send
> event doesn't seem to do it.

Did you try to use SEND_EVENT to put the event on the event queue?
What if you just called your button event handler directly from
your draw widget event handler, with an obviously fake "button"
event?

> On a related note, I wrote an extension to CW_PDMENU which allows the
> setting of accelerators and checked_menus for each menu item (rather
> than having the string 'code / menuitem name / handler' I just
> appended ' / accelerator / checked?' It works fine (except not for
> context menus and not for the top level buttons), but this seems like
> such an obvious thing to do I was wondering if it had been implemented
> elsewhere and I just missed it.

The best ideas are always the obvious ones. :-)

Cheers,

David

P.S. Context menus are pretty weird. I've never been able to
make them really sing and dance exactly the way I wanted them
to. :-)

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: DLM heap variable access
Next Topic: Re: An approximation of the cumulative integral of Y

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

Current Time: Sat Oct 11 19:38:13 PDT 2025

Total time taken to generate the page: 0.40223 seconds