Display an Xdialog Box
- Overview
- Procedure
- Button
- Check Box-List Box
- Combo Box
- Edit-Combo Box
- Email (Alpha Anywhere)
- Expression
- Field Select
- File Select
- Filter Expression
- Folder Select
- HTML Text
- List Box
- List View Control
- Multi-line Text Box
- Mult-select List Box
- Order Expression
- Password
- Property-grid style Dialog
- Property Sheet Style Xdialog
- Radio Buttons
- Record List-Combo Box
- Record List-Edit Combo Box
- Record List-List Box
- SimpleChart
- Static Text
- Text Box
- Tree Control
- URL
- Web Browser
- Define Title
Description
Procedure for displaying an xdialog box:
Overview
Xdialog boxes allow you to perform complex database operations using dialog boxes. Xdialog boxes can handle multiple variables as well as a wide range of control types. The Display an Xdialog Box action greatly simplifies the construction process of Xdialog boxes. The dialog box that you create may contain an arbitrary number of buttons, controls, and variables. For an example of returning multiple values from an Xdialog, see Returning Multiple Values from an Xdialog.
Procedure
The Xdialog box needs a variable to capture the value generated by each control.
Create a new Action Script.
Select "Xdialog Windows" in the Category list.
Select "Display an XDialog Box" in the Action list.
Click OK to display the Script Genie.
In the Variable Name field enter the name of the variable for the first control.
Optionally enter a prompt for the control in the Prompt field.
Select the data type of the control in the Type field. There are four types to choose from:
"Character": One or several letters or numbers.
"Numeric": Numbers with optional decimals.
"Date": Accepts any valid date in "mm/dd/yyyy" format.
"Logical": Accepts a true or false value.
Enter the character width of the control in the Width field. This field does not apply to buttons.
Optionally check the Default Value check box and enter a default value or expression in the field to its right. Optionally, click the 'xy' button to open the Expression Builder.
Select the type of control from the Style list box. To see a demonstration of the various styles listed, click the Style button next the Style selection box. The following controls are supported:
Button
You can specify the border style, button text, bubble help, justification, size, and Xbasic code or script to run.
Check Box-List Box
You can enter the choices to display in the combo box or enter an expression that generates a CR-LF delimited list of choices.
Combo Box
You can enter the choices to display in the combo box or enter an expression that generates a CR-LF delimited list of choices.
Edit-Combo Box
You can enter the choices to display in the combo box or enter an expression that generates a CR-LF delimited list of choices.
Email (Alpha Anywhere)
Displays the internal Alpha Anywhere email client.
Email
Displays the default third-party email client.
Expression
You can specify the table or set to operate against.
Field Select
You can specify the table or set to select from.
File Select
You can specify one or more file types to look for, dialog title, default file selection, and whether the file must or must not exist.
Filter Expression
You can specify the table or set to operate against.
Folder Select
You can specify one or more drive letters, default folder, and dialog title.
HTML Text
Displays HTML text that can be specified by the developer, retrieved from a file, generated by an expression, or from a URL. You can specify border style, scroll bars, enabled or disabled, and whether to respond to ActiveX events. If you specify that you want to respond to ActiveX events, the code generated by the genie contains event handler functions, into which you may insert your Xbasic code.
List Box
You can enter the choices to display in the combo box or enter an expression that generates a CR-LF delimited list of choices.
List View Control
Display data with a view that looks like the Windows Explorer.
Multi-line Text Box
Displays a text box that will accept multiple lines.
Mult-select List Box
You can enter the choices to display in the combo box or enter an expression that generates a CR-LF delimited list of choices. In addition, you can set key stroke style required to make multiple selections.
Order Expression
You can specify the table or set to operate against.
Password
Displays a password input dialog.
Property-grid style Dialog
Creates a dialog box in the format of the property grids used extensively throughout the Web Component Builders.
Property Sheet Style Xdialog
Creates a dialog box in the format of the property sheets used extensively throughout the Web Component Builders.
Radio Buttons
You enter the choices to display and set the display format to either a horizontal or vertical list.
Record List-Combo Box
You can specify the table or set that provides the list data, an optional record filter, the fields to display, the order of the fields, and a field or expression that defines the return value.
Record List-Edit Combo Box
You can specify the table or set that provides the list data, an optional record filter, the fields to display, the order of the fields, and a field or expression that defines the return value.
Record List-List Box
You can specify the table or set that provides the list data, an optional record filter, the fields to display, the order of the fields, and a field or expression that defines the return value.
SimpleChart
Displays a pie, line, or bar chart based on numeric data from a table.
Static Text
Displays static text with an optional image. The text may be derived from an expression.
Text Box
Displays a text box that will accept a single line.
Tree Control
You can enter the choices to display in the combo box or enter an expression that generates a CR-LF delimited list of choices. In addition, you can specify the delimiter character.
URL
Displays a URL address input dialog and optionally displays the specified page.
Web Browser
Displays a URL specified by the developer, the user, or generated by an expression. You can also specify a prompt, button label, default URL, disabled or enabled, and whether to respond to ActiveX events. If you specify that you want to respond to ActiveX events, the code generated by the genie contains event handler functions, into which you may insert your Xbasic code.
Depending on the type of control selected, enter the control's height in lines in the Height field.
For most of the styles, you will need to click the Define button to specify values for the style. For example, if you select "List Box", you would then press the Define List Box button to define the values within the List Box Choices dialog box. If your selection was "Property-sheet style Dialog", refer to Property-Sheet Style Dialog.
If you want to put additional controls on the Xdialog, click Add New Variable and repeat steps 1 through 8. The arrow and delete buttons to the left of the window let you rearrange the order and delete the variables.
Optionally click the Preview button to see what the new dialog box will look like.
Click Next >.
Define Title
Optionally, enter the title of the dialog box in the Dialog Title field.
Optionally, enter text to appear at the top of the dialog box into the Header Text field.
Optionally, enter text to appear at the bottom of the dialog box into the Footer Text field.
Optionally, modify the bottom labels in the Button Text fields.
Click Next >.
Optionally, modify the name of the variable in the Variable Name field that will capture the return value of the Xdialog box.
Optionally, change the Scope of the return variable to one the following values. A variable's scope refers to where the variable can be seen, i.e. which other scripts can access the variable.
"Shared". Variables are available throughout the current form.
"Global". Variables are available anywhere in Alpha Anywhere.
"Local". Variables are available only in the current script.
Click Next >.
Optionally, modify the comment that describes the action.
Click Finish.
See Also