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

Home » Public Forums » archive » Re: TEXT FIELD in a CONTEXT MENU ?
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: TEXT FIELD in a CONTEXT MENU ? [message #66596 is a reply to message #66595] Mon, 25 May 2009 13:00 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
nata writes:

> I want to display a CONTEXT MENU (pop-up or shortcut menu) with a
> WIDGET_TEXT or CW_FIELD. I don't know if it's possible because, right
> now, when I try to add a text component, the IDL gives me the
> following message: Parent is of incorrect type.
>
> base=WIDGET_BASE(parent,/COLUMN,/FRAME,/CONTEXT_MENU)
> option_1=CW_PDMENU(base,['0\ option 1'],/CONTEXT_MENU)
>
> ;; here is where I've the problem -------------------------------
> option_text=WIDGET_TEXT(base,VALUE='text')
> ;;
> ------------------------------------------------------------ ---------
> WIDGET_DISPLAYCONTEXTMENU, event.id, event.x, event.y, base
>
> Is there a correct way to add a text field in a CONTEXT MENU ? If not
> how can I do something similar?

Only button widgets are allowed as children of a contextmenu base
widget. What you want to do isn't possible with context menus.

You are free, of course, to build your own pop-up dialog
widgets in any way you like.

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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Combining polygons
Next Topic: Re: Is there IDL v7.0 help online?

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

Current Time: Sat Oct 11 14:43:09 PDT 2025

Total time taken to generate the page: 0.95962 seconds