CancelButton Property
Property that allows you to get or set which push button is activated
when the user pressed the Esc key. The default value for this property
is "Cancel."
object.CancelButton
= caption_of_button
existing_value = object.CancelButton
Arguments
|
object |
|
Required. A
variable containing a dialog object created by calling CreateObject or
new ActiveXControl. |
|
caption_of_button |
|
Required. Caption of the button that should
be activated when the user presses the Esc key. |
|
existing_value |
|
A variable to receive the caption of the
button that will be activated when the user presses the Esc key. |
Remarks
If your dialog box does not include a button with the caption "Cancel,"
you should set the CancelButton
property to the caption of some other button on your dialog box. See also
DefaultButton.
Example
Sub main
Set Dialog = CreateObject("TPFSoftware.ScriptDialog")
Dialog.AddButtons "button", Array("Continue", "Quit")
Dialog.CancelButton = "Quit"
Set Result = Dialog.Execute
If Result.ValueOf("button") = "Quit"
End If
End Sub
|