dmartin@cs.iastate.edu (David M. Martin Jr.) (07/25/90)
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
bazavan@hpcilzb.HP.COM (Valentin Bazavan) (07/25/90)
> 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
roger@zuken.co.jp (Roger Meunier) (07/25/90)
In article <2331@dino.cs.iastate.edu> dmartin@cs.iastate.edu (David M. Martin Jr.) writes: >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.. The following code frag (from xmfonts.c) should give you a clue: message_box = XmCreateMessageDialog(...); button = XmMessageBoxGetChild (message_box, XmDIALOG_CANCEL_BUTTON); XtUnmanageChild (button); Motif has a convenience routine (kludge ;-) for everything... -- Roger Meunier @ Zuken, Inc. Yokohama, Japan (roger@zuken.co.jp)