DefaultButton Property
Property that allows you to get or set which push button is activated
when the user presses the Enter key. The default value for this property
is "OK."
object.DefaultButton
= caption_of_button
existing_value = object.DefaultButton
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 Enter key. |
|
existing_value |
|
A variable to receive the caption of the
button that will be activated when the user presses the Enter key. |
Remarks
If your dialog box does not include a button with the caption "OK,"
you should set the DefaultButton
property to the caption of some other button on your dialog box. See also
CancelButton.
Example
Sub main
Set Dialog = CreateObject("TPFSoftware.ScriptDialog")
Dialog.AddButtons "button", Array("Continue", "Quit")
Dialog.DefaultButton = "Continue"
Set Result = Dialog.Execute
If Result.ValueOf("button") = "Continue"
End If
End Sub
|