Path: utzoo!attcan!uunet!cs.utexas.edu!samsung!zaphod.mps.ohio-state.edu!sdd.hp.com!hplabs!hpda!hpcuhb!hpcilzb!bazavan From: bazavan@hpcilzb.HP.COM (Valentin Bazavan) Newsgroups: comp.windows.x.motif Subject: Re: ErrorDialog--- how do I kill the cancel button? Message-ID: <17100001@hpcilzb.HP.COM> Date: 25 Jul 90 14:02:39 GMT References: <2331@dino.cs.iastate.edu> Organization: HP Design Tech Center - Santa Clara, CA Lines: 24 > My application finds it entirely natural to use XmCreateErrorDialog to > notify the user that "it ain't gonna work." Since there's nothing > s/he can do but accept this, it seems awfully redundant to me to have > an "OK" button *and* a "cancel" button. (I am indeed using the > included "help" button.) > > Does anyone know how I can get rid of one of those buttons without > building my own popup? I like the look of the Motif dialog boxes. I > *really* like not having to build my own.. > > > David M. Martin Jr. dmartin@atanasoff.cs.iastate.edu > Department of Computer Science Iowa State University Use XmMessageBoxGetChild to get the widget IDs of the buttons you want to get rid of, then unmanage them: cancel_button = XmMessageBoxGetChild(dialog, XmDIALOG_CANCEL_BUTTON); XtUnmanageChild(cancel_button); ok_button = XmMessageBoxGetChild(dialog, XmDIALOG_OK_BUTTON); XtUnmanageChild(ok_button); etc. Valentin Bazavan