Xref: utzoo comp.windows.x:31232 comp.windows.x.motif:1577 Path: utzoo!censor!geac!torsqnt!news-server.csri.toronto.edu!clyde.concordia.ca!thunder.mcrcim.mcgill.edu!snorkelwacker.mit.edu!apple!usc!samsung!uunet!pmafire!uudell!bigtex!texsun!smunews!ti-csl!m2.csc.ti.com!jmellby From: jmellby@m2.csc.ti.com (John Mellby) Newsgroups: comp.windows.x,comp.windows.x.motif Subject: Restricting or "greying out" menu items Message-ID: <1991Jan4.193714.19947@csc.ti.com> Date: 4 Jan 91 19:37:14 GMT Sender: jmellby@csc.ti.com (John Mellby) Organization: TI Computer Science Center, Dallas Lines: 25 We want to build a menu application in X11R4/Motif 1.0.3 (soon to be Motif 1.1) that has the 'grey out' functionality in the menus. I.E. We want to build a menu, and depending upon the state of the application, prevent the user from selecting some of the menu items. Some of this could feasibly be done through mwm, but generally we can't use the f.nop of Mwm because these temporary windows aren't controlled by Mwm. I know how to do this through creating the menus using pushbuttons when selectable and labels (in a different font) when not. However, I don't want to create a new menu with different widgets each time the selectivity of a command changes. Could I use the same menu widget switching sub-widgets between displays? How? Could I work within the pushbuttons, ie change the font of the label and change the callback function, then re-realize the menu on demand? This seems the best solution to me at present. Is there some easy way to do this I don't know about? Dave Beck beck@flopn2.ti.com or John R. Mellby Texas Instruments jmellby@skvax1.ti.com P.O.Box 869305, MS 8513 Plano, Texas, 75086 (214)517-5370 (214)575-6774 (work)