| > My problem is that when you click on the clear push button, the entire
> popup_dialog_box clears away leaving only its parent.
I'm not sure what you mean by that, but a modal dialog box does
have a resource named DwtNautoUnmanage which might be the problem.
It defaults to TRUE, and when TRUE, it causes the activation of any
push button to unmanage the dialog box as a side-effect. If this
is your problem, set it to FALSE, and unmanage the dialog box
yourself when the user pushes the OK button.
Leo
|
|
I'm having a similar problem. I am using a modal dialog box widget to
get input, and I have set up a default button. (using DwtNdefaultButton)
I want the dialog box to stay managed when the button is "pushed" and
there is no input (or invalid input) specified. I have set
DwtNautoUnmanage to be False on the dialog box widget, but it still
disappears when the button is activated.
However, if I make the dialog box modeless, it works fine.
I am running VMS V5.2, with the associated Decwindows kit (V1?),
on a GPX.
Any help/pointers are appreciated.
Thanks,
-Andy
The relevant code is as follows:
.
.
.
dialogBox = DwtDialogBox(mainwindow, "", TRUE, 300, 300,
NULL, DwtModal, NULL, NULL);
.
. /* subwidgets of dialog box created here, including okayButton & *
. * filenameText */
.
XtSetArg(arglist[0], DwtNautoUnmanage, 0);
XtSetArg(arglist[1], DwtNdefaultButton, okayButton);
XtSetValues(dialogBox, arglist, 2);
.
. /* some other junk done here /
.
DwtMainSetAreas(mainwindow, menubar, NULL, NULL, NULL, NULL);
XtRealizeWidget(toplevel);
XtManageChild(dialogBox);
XtMainLoop();
/**********************/
default button activate callback routine:
strcpy(input_filename, DwtSTextGetString(filenameText));
if (strlen(input_filename) > 0)
{
XtUnmanageChild(dialogBox);
.
. /* some other junk done here /
.
}
return;
|
|
> dialogBox = DwtDialogBox(mainwindow, "", TRUE, 300, 300,
> NULL, DwtModal, NULL, NULL);
>
> .
> . /* subwidgets of dialog box created here, including okayButton & *
> . * filenameText */
> .
>
> XtSetArg(arglist[0], DwtNautoUnmanage, 0);
> XtSetArg(arglist[1], DwtNdefaultButton, okayButton);
> XtSetValues(dialogBox, arglist, 2);
DwtNautoUnmanage is a widget resource that you cannot change after the
widget has been created (see the manual...). You will have to use the
low-level create routine.
Leo
|