Path: utzoo!utgpu!watserv1!watmath!att!rutgers!usc!srhqla!quad1!carl From: carl@quad1.quad.com (Carl Priddy) Newsgroups: comp.windows.x.motif Subject: Re: MenuBar question Summary: menu bar children Message-ID: <15467@gouda.quad.com> Date: 17 Oct 90 17:04:35 GMT References: <1990Oct15.232357.17960@wrl.dec.com> Organization: Quadratron Systems Inc, Thousand Oaks Ca Lines: 17 In article <1990Oct15.232357.17960@wrl.dec.com>, may@may.pa.dec.com (G. May Yip) writes: > I wonder if it is legal to construct a Motif menubar such that some of > the cascade buttons don't have any pulldown menu and command button(s) > as children? That is, I'd like to set it up such that a callback > routine is attached to the cascade button, rather than to the command > button(s) inside the pulldown menu, as is usually done. I tried to do > some but ran into some problem :( > Yes, it is legal to have a cascade button on a menu bar act like a regular old pushbutton. That is, if the XmNsubMenuId resource is NULL, then there is no menu to be managed when the button is activated. This is a method of "mixing" pulldown menus and pushbuttons on the menu bar which does not give the warning about "mixing children in a homogeneous something or other" (who dreams these messages up?). As far as I can tell, all that is required to have this work just like you want is to make sure that the XmNsubMenuId is NULL, and attach your activate callback. carl.