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 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: TEXT FIELD in a CONTEXT MENU ? [message #66593] Mon, 25 May 2009 18:04
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
On May 25, 8:57 pm, nata <bernat.puigdomen...@gmail.com> wrote:
> Hi,
>
> Coding my pop-up program I've 1 question of how to implement a
> specific property.
> I want the same functionality as a CONTEXT_MENU, so if the pop-up
> loses the focus, it has to disappear.
>
> I can place the pop-up correctly but I'm not sure of how to do this.
> Any suggestions ?
>

ok KBRD_FOCUS_EVENTS is the solution
Re: TEXT FIELD in a CONTEXT MENU ? [message #66594 is a reply to message #66593] Mon, 25 May 2009 17:57 Go to previous message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
Hi,

Coding my pop-up program I've 1 question of how to implement a
specific property.
I want the same functionality as a CONTEXT_MENU, so if the pop-up
loses the focus, it has to disappear.

I can place the pop-up correctly but I'm not sure of how to do this.
Any suggestions ?

Thanks,
nata
Re: TEXT FIELD in a CONTEXT MENU ? [message #66595 is a reply to message #66594] Mon, 25 May 2009 13:06 Go to previous message
natha is currently offline  natha
Messages: 482
Registered: October 2007
Senior Member
ok, thank you, I'm already coding my own pop-up dialog.

cheers,
nata
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.")
  Switch to threaded view of this topic Create a new topic Submit Reply
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: Wed Oct 08 18:41:50 PDT 2025

Total time taken to generate the page: 0.00569 seconds