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

Home » Public Forums » archive » widgets xmanager and xpdmenu
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
widgets xmanager and xpdmenu [message #1663] Wed, 16 February 1994 16:42 Go to next message
jat is currently offline  jat
Messages: 4
Registered: August 1992
Junior Member
I have a large IDL application for which I would like to set
up a menu interface. I would like to have 5-10 menu buttons with
pulldown menus, hence I'm using 'xpdmenu'. Each menu button is
registered using 'xmanager' and has an 'event_handler' routine. Each
menu button has a parent menu and each parent menu has some items that
have submenus. (I'm not sure yet if I can register each menu button
separately, but let's assume I can).
My problem occurs with the submenus that I have for some of
the menu selections. What I would like to do is have a different
routine to handle events from a submenu. I don't want to use the same
routine as registered with the 'event_handler' for the parent menu.
Is there any way that I can call a different 'event_handler' routine
if an item from a submenu is selected ?
The reason why I want to do this is because the submenu items
perform tasks that are distinct from the tasks performed by the items
in the main menu. I really don't want to have a huge case statement
in only one 'event_handler' routine that is forced to handle every
item from the parent menu and every item from each of its submenus.
I've thought about having no submenus, but that would result
in a cluttered menu base with a whole bunch of menu buttons.
--
Jatinder Singh 916-653-7564
jat@water.ca.gov ...ucbvax!ucdavis!caldwr!jat
Any opinions expressed are my own; they do not represent the DWR.
Re: widgets xmanager and xpdmenu [message #1742 is a reply to message #1663] Fri, 18 February 1994 12:10 Go to previous message
meinel is currently offline  meinel
Messages: 14
Registered: February 1994
Junior Member
In article <JAT.94Feb16164227@grizzly.water.ca.gov> jat@water.ca.gov (Jatinder Singh) writes:
>
> I have a large IDL application for which I would like to set
> up a menu interface.

First of all, use the compound widget menu tool - it makes things a
lot easier.

> My problem occurs with the submenus that I have for some of
> the menu selections. What I would like to do is have a different
> routine to handle events from a submenu.

Use /RETURN_FULL_NAME for the menu items. Then eventval will contain
the menu item name and event.value will contain the event item name
with the subitem name appended to it. Then use

CASE eventval OF
"Item1": CASE event.value OF
"Item1.Subitem1": do something
"Item1.Subitem2": do something else
ENDCASE
ENDCASE

The advantage of returning the full name is that subitems of different
menu items can have the same name.

Ed
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: formated text entry fields
Next Topic: Re: [SUMMARY & Software] Tcl/Tk with IDL/Pvwave or Matlab

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

Current Time: Wed Oct 08 16:01:29 PDT 2025

Total time taken to generate the page: 0.01124 seconds