Re: CW_PDMENU help [message #68682] |
Wed, 18 November 2009 14:35 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
nata writes:
> I don't know if the problem is my computer but I don't see the menu
> properly. I expected to see a list of options and, as I mentioned
> before, I obtain one property 'in front of' the other one.
> That's what I see: http://www.meteo.mcgill.ca/~bernat/tmp/result.jpg
>
> The correct result would be a list of these properties.
> I tried without the column keyword and the result is the same...
>
> Do you have the same result?
I have the same result on LINUX with IDL 7.0. My Windows
IDL 7.1 machine shows the correct result with the two
properties stacked in a column.
I don't have any idea, off-hand, how to fix it. It looks
like an XWindows bug to me.
Cheers,
David
--
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.")
|
|
|
Re: CW_PDMENU help [message #68683 is a reply to message #68682] |
Wed, 18 November 2009 14:34  |
jeanh
Messages: 79 Registered: November 2009
|
Member |
|
|
nata wrote:
> I don't know if the problem is my computer but I don't see the menu
> properly. I expected to see a list of options and, as I mentioned
> before, I obtain one property 'in front of' the other one.
> That's what I see: http://www.meteo.mcgill.ca/~bernat/tmp/result.jpg
>
> The correct result would be a list of these properties.
> I tried without the column keyword and the result is the same...
>
> Do you have the same result?
> Thanks,
> nata
ah, I see....
no, here the menu looks ok! (i just sent you a private message with the
result I get). Though, I am on Windows...
Jean
|
|
|
Re: CW_PDMENU help [message #68684 is a reply to message #68683] |
Wed, 18 November 2009 14:00  |
natha
Messages: 482 Registered: October 2007
|
Senior Member |
|
|
I don't know if the problem is my computer but I don't see the menu
properly. I expected to see a list of options and, as I mentioned
before, I obtain one property 'in front of' the other one.
That's what I see: http://www.meteo.mcgill.ca/~bernat/tmp/result.jpg
The correct result would be a list of these properties.
I tried without the column keyword and the result is the same...
Do you have the same result?
Thanks,
nata
|
|
|
Re: CW_PDMENU help [message #68690 is a reply to message #68684] |
Wed, 18 November 2009 11:29  |
jeanh
Messages: 79 Registered: November 2009
|
Member |
|
|
nata wrote:
> I agree with your post Laura but I'm just discussing the appearance of
> the context_menu.
> If you see, the 2 properties (variable and palette) are displayed one
> above the other. It seems that the column KEYWORD doesn't work or
> something strange is happening.
> I just want to display these 2 properties correctly as a simple list
> of properties.
> Thanks anyway,
> nata
this is the expected behavior of the column keyword... you get the
menus, well, in one column. Maybe you should try without the keyword?!
Jean
PS: it is extremely difficult to guess what you are looking after...
|
|
|
Re: CW_PDMENU help [message #68692 is a reply to message #68690] |
Wed, 18 November 2009 11:10  |
natha
Messages: 482 Registered: October 2007
|
Senior Member |
|
|
I agree with your post Laura but I'm just discussing the appearance of
the context_menu.
If you see, the 2 properties (variable and palette) are displayed one
above the other. It seems that the column KEYWORD doesn't work or
something strange is happening.
I just want to display these 2 properties correctly as a simple list
of properties.
Thanks anyway,
nata
|
|
|
Re: CW_PDMENU help [message #68696 is a reply to message #68692] |
Wed, 18 November 2009 08:17  |
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
|
|
|
Re: CW_PDMENU help [message #68703 is a reply to message #68696] |
Tue, 17 November 2009 11:17  |
natha
Messages: 482 Registered: October 2007
|
Senior Member |
|
|
: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
|
|
|