User Guide
649
SPSS Scripting
Facility
Case 2. Executes when a button is pushed or when a value changes in a CheckBox,
DropListBo
x
, ListBox or OptionGroup control. If a button is pushed,
strDlgItem is the button, intSuppValue is meaningless, and you must set
DialogFunc = True to prevent the dialog from closing. If a value changes,
strDlgItem
is the item whose value has changed, and intSuppValue is the
new value.
Case 3. Executes when a value changes in a TextBox or ComboBox control.
The string
strDlgItem is the control whose text changed and is losing focus;
intSuppVa
lue
is the number of characters.
Case 4. Ex
ecutes when the focus changes in the dialog box. The string
strDlgItem is gaining focus, and intSuppValue is the item that is losing
focus (the first item is 0, second is 1, and so on).
Case 5. Idle processing. The string strDlgItem is a null string; intSuppValue
is 0. Set D
ialogFunc
= True to continue receiving idle actions.
For more information, see the examples and the
DialogFunc prototype in the Sax
BASIC Language Reference Help file.
Example:
Scripting a Simple D ialog Box
This scri
pt creates a simple dialog box that opens a data file. See related sections for
explanations of the
BuildDialog subroutine and dialog monitor function.
Figure 46
-17
Open Data
File dialog box created by script
Sub Main
Call BuildDialog
End Sub
'define dialog box
Sub Build
Dialog
Begin Dialog UserDialog 580,70,"Open Data File",.Dial ogFunc
Text 40,7,280,21,"Data file to open:",.txtDialogTitle