X-Alens-uprop: archive-type=printer-hardcopy
X-Alens-uprop: save-for=1 year
Received: by ATHENA-PO-2.MIT.EDU (5.45/4.7) id AA14877; Tue, 21 Nov 89 14:05:54 EST
Received: from OSF.OSF.ORG by ATHENA.MIT.EDU with SMTP
	id AA12732; Tue, 21 Nov 89 14:05:29 EST
Received: from postman.osf.org by osf.osf.org (5.61/OSF 0.9)
	id AA20826; Tue, 21 Nov 89 13:58:57 -0500
Received: from gozer.osf.org by postman.osf.org (5.61/OSF 0.9)
	id AA16699; Tue, 21 Nov 89 13:58:55 -0500
Received: by gozer.osf.org.osf.org (5.61/4.7) id AA12986; Tue, 21 Nov 89 13:58:48 -0500
Date: Tue, 21 Nov 89 13:58:48 -0500
From: rap@OSF.ORG
Message-Id: <8911211858.AA12986@gozer.osf.org.osf.org>
To: delhi!johnson%pdaeng.uucp@ICS.UCI.EDU
Cc: motif-talk@OSF.ORG, delhi!vax.dnet!willson%pdaeng.uucp@ICS.UCI.EDU
In-Reply-To: Malcolm Johnson's message of Fri, 17 Nov 89 09:24:03 -0800 <8911171724.AA00501@delhi.local>
Subject: rowColumn widgets using the XmMENU_OPTION XmNrowColumnType

   From delhi!johnson%pdaeng.uucp@ICS.UCI.EDU Fri Nov 17 12:34:53 1989
   From: Malcolm Johnson <delhi!johnson%pdaeng.uucp@ICS.UCI.EDU>
   Date: Fri, 17 Nov 89 09:24:03 -0800


   hello gadget and widget users:

   i am having a problem with the rowColumn widget that i hope someone can
   shed some light on.  specifically, i incur problems when i create menu
   entries for a rowColumn that was created under the following circumstances:

      -> the rowColumn's parent is a managed and popped up (using XtPopup)
	 bulletin board,

      -> the rowColumn was created using the XmNrowColumnType of XmMENU_OPTION,

      -> the rowColumn is managed,

      -> a pulldownMenu has been created and assigned to the rowColumn as
	 the XmNsubMenuId,

      -> menu entries are created as push buttons and reference the submenu
	 as their parent.

   the above scenario works well if the bulletin board has not been popped
   up.

This is not the proper hierarchy for creating option menus although its a
good try.  An option menu is composed of 2 gadgets inside of a row column
widget.  One gadget is a label (xmLabelgadgetClass) , the other is a
cascading pushbutton gadget (xmCascadeButtongadgetClass).  The easy way to
creeate an option menu is to first create a pulldown menupane using the
convenience function XmCreatPulldownMenu(..) specifying the parent of the
to-be option menu (i.e. the parent of the to-be row column widget) as the
parent of the menupane.  The parent must, of course, be a composite widget
like a form widget.  Option menus cannot be created as children of any
widget as a popup menus can.  Then fill this menupane with PushButtonGadgets
or CascadeButtonGadgets (for sub menus).  For sub menus, create a pulldown
menu as the child of the top level pulldown menupane (no matter how 'deep'
the menupane is, always create it as the child of the topmost menupane) and
set the XmNsubMenuId resource of the CascadeButtongadget to the submenu
widget id (returned by XmCreatePulldownMenu(..)).  When you have finished
creating the menu hierarchy with the menupanes, create the option menu (row
column widget) with a call to the function XmCreateOptionMenu(..) specifying
its parent widget to be the same widget used as the parent in the call to
XmCreatePulldownMenu(..).  When creating the option menu make sure you
specify the resource XmNsubmenuId to be the topmost menupane in your menu
hierachy.  Note that both the RowColmn and the CascadeButton (and
CascadeButtonGadget) widgets have a resource called XmNsubmenuId.  They
serve similar purposes in that they specify which menupane to post in
response to some action.  Note that option menus are designed to work with
non-cascading menus, although I have used them succesfully with cascading
menus.  Note also that the Motif style guide implies that only non-cascading
menus be used with option menus.


      -> am i using the proper widget hierarchy for the rowColumn?

see above.

      -> would i have better luck using gadgets?

use PushButtonGadgets and CascadeButtonGadgets wherever possible.

      -> is this a bug?  in which case, what is the nature of it?

Nope, no bug.

   thanks in advance,

   malcolm johnson
   engineering software specialist
   pda engineering
   2975 redhill ave
   costa mesa, ca  92626
   johnson@pda.com



__Rich Pito
	Systems Engineer
	Open Software Foundation
	
