I know it is a simple one, but I can't seem to find the answer.
When I press the x button, what output is produced ? What is the default value of that button.
Cheers guys.
What is the result of pressing the red 'x' on a dialog
Moderators: Dorian (MJT support), JRL
-
- Junior Coder
- Posts: 24
- Joined: Sun Jun 11, 2006 9:50 am
What is the result of pressing the red 'x' on a dialog
don't be a chicken little
If you are running a modal dialog, one that is displayed by using:
Show>DialogName,result
The value of the variable "result" will be 2 after picking the "X" in the upper right hand corner of the dialog.
Running a non-modal dialog and using the line:
GetDialogAction>DialogName,result
The value of the variable "result" will also be 2 after picking the "X" in the upper right hand corner of the dialog.
Because picking the "X" is a cancel activity, it is a good idea to set the result value of any "Cancel" buttons in a dialog to be 2. For example:
Dialog>MyDialog
Width=250
Height=100
Top=200
Left=300
Button=Cancel,85,30,80,30,2
EndDialog>MyDialog
Show>MyDialog,result
Show>DialogName,result
The value of the variable "result" will be 2 after picking the "X" in the upper right hand corner of the dialog.
Running a non-modal dialog and using the line:
GetDialogAction>DialogName,result
The value of the variable "result" will also be 2 after picking the "X" in the upper right hand corner of the dialog.
Because picking the "X" is a cancel activity, it is a good idea to set the result value of any "Cancel" buttons in a dialog to be 2. For example:
Dialog>MyDialog
Width=250
Height=100
Top=200
Left=300
Button=Cancel,85,30,80,30,2
EndDialog>MyDialog
Show>MyDialog,result
-
- Junior Coder
- Posts: 24
- Joined: Sun Jun 11, 2006 9:50 am