Xref: utzoo comp.windows.x:31216 comp.windows.x.motif:1576 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!usc!bbn.com!ulowell!hawk!mschedlb From: mschedlb@hawk.ulowell.edu (Martin J. Schedlbauer) Newsgroups: comp.windows.x,comp.windows.x.motif Subject: Re: Restricting or "greying out" menu items Message-ID: <1679@ulowell.ulowell.edu> Date: 5 Jan 91 19:32:48 GMT References: <1991Jan4.193714.19947@csc.ti.com> Sender: news@ulowell.ulowell.edu Reply-To: mschedlb@hawk.ulowell.edu (Martin J. Schedlbauer) Followup-To: comp.windows.x Organization: University of Lowell, CS Dept. Lines: 20 In article <1991Jan4.193714.19947@csc.ti.com> jmellby@m2.csc.ti.com (John Mellby) writes: > > 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. The XmLabel widget has the XmNsensitive resource. If set to true it will display the XmNlabeString "grayed out" and it won't activate the button. To set the sensitivity via the application state, you should keep the widget ID of the button around (ie. use MrmNcreateCallback if UIL) and change the XmNsensitive resource using XtSetArg/XtSetValues. ...Martin Martin Schedlbauer (mschedlb@ulowell.edu) Institute for Visualization and Perception Research Department of Computer Science University of Lowell, Lowell, MA 01854 (Tel: (508) 934-3612)