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

Home » Public Forums » archive » Re: CW_PDMENU help
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 help [message #68696 is a reply to message #68692] Wed, 18 November 2009 08:17 Go to previous messageGo to previous message
Laura is currently offline  Laura
Messages: 9
Registered: August 2009
Junior Member
On Nov 17, 2:17 pm, nata <bernat.puigdomen...@gmail.com> wrote:
> :S !!!!! help !!! XP
>
>   menu_list=[ '1\Variable', '0\A', '0\B', '0\C', $
>    '2\D', '1\Palette','0\34', '0\35', '2\39']
>
>   base = WIDGET_BASE()
>   text = WIDGET_DRAW(base,XSIZE=300,YSIZE=300)
>
>   WIDGET_CONTROL, base, /REALIZE
>
>   context_base=WIDGET_BASE(base, /CONTEXT_MENU)
>   menu = CW_PDMENU(context_base, menu_list, /CONTEXT_MENU, /COLUMN)
>
>   WIDGET_DISPLAYCONTEXTMENU, text, 150, 150, context_base

I'm not an expert, but my understanding of the
"WIDGET_DISPLAYCONTEXTMENU" is you should call it from the procedure
handling your events. Since you have the draw widget, you need to add
"/button_events" in your widget_draw, and check if the right button is
clicked in the event handler using "if (event.release EQ 4)" and add
the "WIDGET_DISPLAYCONTEXTMENU" procedure in the if...then statement.


Laura
Laura
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: import multilayer raster
Next Topic: Re: Some more symbols to plot some data

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

Current Time: Sat Oct 11 04:29:52 PDT 2025

Total time taken to generate the page: 0.79909 seconds