clive@aldetec.oz (Clive Salvidge) (09/06/90)
I am playing with XmMessageBox() and the like.... It says in the good book that.. "A MessageBox can contain a message symbol, a message, and up to three default PushButtons" I only want one PushButton (sob), How can I make the other two go away ..Hopefull ..Clive __________________________________________________________________________ Clive Salvidge ACSnet : clive@aldetec.oz Internet : clive@aldetec.oz.au Aldetec Pty Ltd. Voice : +61-9-4451888 0900 - 1700 WST __________________________________________________________________________
jc@uh.msc.umn.edu (Carolyn Wasikowski) (09/06/90)
[ I tried sending mail a couple of times to no avail, so here goes: ] Clive Salvidge writes: >I am playing with XmMessageBox() and the like.... >It says in the good book that.. "A MessageBox can contain a message symbol, >a message, and up to three default PushButtons" > >I only want one PushButton (sob), How can I make the other two go away Use something like: XtUnmanageChild(XmMessageBoxGetChild(msgbox, XmDIALOG_CANCEL_BUTTON)); XtUnmanageChild(XmMessageBoxGetChild(msgbox, XmDIALOG_OK_BUTTON)); If you want, you can also rename the remaining button. For example, I only wanted a single "Continue" button: n = 0; XtSetArg(args[n], XmNhelpLabelString, XmStringCreateLtoR("Continue", XmSTRING_DEFAULT_CHARSET)); n++; XtSetValues(msgbox, args, n); -JC -- jc@uh.msc.umn.edu "...and, whether or not clear to you, no doubt the universe is unfolding as it should."
wds@uarthur.UUCP (William D. Sheppard) (09/07/90)
>I am playing with XmMessageBox() and the like.... >It says in the good book that.. "A MessageBox can contain a message symbol, >a message, and up to three default PushButtons" >I only want one PushButton (sob), How can I make the other two go away You need to use the XmMessageBoxGetChild (Programmers Reference page 1-611) to access the button widgets that you want to remove. Then use the Intrinsics routine XtUnmanageChild to get rid of the unwanted buttons. For example to remove the help button: Widget helpButtonWidget; helpButtonWidget = XmMessageBoxGetChild(messageBoxWidgetID, XmHELP_BUTTON); XtUnmanageChile(helpButtonWidget); Bill Sheppard Consultant World Bank, Washington DC
courtney@hpcvlx.cv.hp.com (Courtney Loomis) (09/07/90)
Use the XmMessageBoxGetChild routine to get the widget ID of the buttons that you don't want, and then unmanage those buttons. Courtney Loomis Interface Technology Operation Hewlett-Packard Company Corvallis, Oregon