Xdialog Text Boxes
Description
Syntax for creating Text Box controls, including Static and Dynamic Text, in an Xdialog.
- Name
- Description
- Dynamic Text
If you want to display text that is stored in a variable on a dialog box, you can use the {text=string} command to create a dynamic text object on the dialog. Since the size of the dynamic text may change, you must specify a size for the text object. Sizes for most objects on Xdialogs are represented by a columns parameter and an optional rows parameter.
- Dynamic Text H Directive
The H=R directive causes the line spacing of dynamic text to be calculated based on the actual font being used, rather than the default font, which is Arial 8.
- Dynamic Text O Directive
The O directive allows you to format dynamic text. When you have multiple directives in a Format string, you separate them with semi-colons ";".
- Dynamic Text O Directive {@@} Operator
The {@@} operator is used in a Dynamic Text owner draw (O) directive to specify that the text contains embedded formatting commands.
- Dynamic Text O Directive {B} Operator
The {B} operator is used in a Dynamic Text owner draw (O) directive to specify background colors.
- Dynamic Text O Directive {C} Operator
The {C} operator is used in a Dynamic Text owner draw (O) directive to specify foreground colors.
- Static Text
The text "Hello World" is referred to as "static text". Static text is comprised of any characters that don't have special meaning. For example, the '<' and '>' characters have a special meaning.
- Static Text Control Syntax
Refer to the {'} command.
- Static Text H Directive
The H=R directive specifies that width (character) and height (line) calculations will be performed using the currently specified font and point size, rather than the default Arial 8 point.
- Static Text O Directive
The O directive allows you to format static text. When you have multiple directives in a Format string, you separate them with semi-colons ";".
- Static Text O Directive {B} Operator
The {B} operator is used in the static text owner draw (O) directive to specify background colors.
- Static Text O Directive {C} Operator
The {C} operator is used in the static text owner draw (O) directive to specify foreground colors.
- Static Text O Directive {F} Operator
The {F} operator is used in the static text owner draw string to specify font, point size, and style.
- Static Text O Directive {I} Operator
The {I} operator adds an image into a static text. When you have multiple directives in a Format string, you separate them with semi-colons ";".
- Static Text Syntax
The {'} syntax allows you to insert static text anywhere on an Xdialog.
- Text Box * Directive
The * directive defines the Text Box whose text will be auto-selected. When you have multiple directives in a Format string, you separate them with semi-colons ";".
- Text Box A Directive
The A directive allows the text box to accept a Tab as a character, as opposed to moving the cursor to the next control.
- Text Box A5W Directive
The %a5w% flag makes the text box behave like an editor for Alpha Anywhere web pages (e.g. .a5w pages). The html tags are color coded. The text inside the <%a5w ... %> tags are interpreted as Xbasic and all of the bubble help and auto-complete for Xbasic works correctly.
- Text Box F Directive
The F directive converts a text box into a file selection smart control.
- Text Box I Directive
You can turn a standard text box control into a Xbasic Interactive Window using the %I% formatting code. You should define column and row dimensions for the text box that are large enough to display a reasonable size code editor. Here is an example dialog with an embedded code editor.
- Text Box K Directive
The K directive maintains highlighting in a Text Box even when it loses focus.
- Text Box L Directive
You can turn a standard text box control into a Xbasic Code Editor using the %L% formatting code. You should define column and row dimensions for the text box that are large enough to display a reasonable size code editor.
- Text Box M Directive
The M directive creates a multi-line Text Box. You must add CR-LF codes to make the text appear on the second and subsequent lines.
- Text Box N Directive
Causes the Change event to fire only when the control loses focus. Normally, the Change event fires as soon as the value in the control changes.
- Text Box P Directive
The P directive allows hides the input to the text box, allowing it to be used to accept passwords.
- Text Box P= Directive
The P= directive makes the text in a Text Box into a customized smart field.
- Text Box + Directive
Defines a Text Box with auto advance.
- Text Box R Directive
The R directive makes the text in a Text Box read-only.
- Text Box S Directive
The S directive makes the text in a Text Box into a spin control.
- Text Box Syntax
One or more Text Boxes may appear inside the Format section of a UI_DLG_BOX() function. Note that all text box entries are left aligned. To control the left padding of the data in text box controls, see A5.SYSTEM_MODE_SET().
- Text Box TF Directive
The TF directive precedes a time or date format. When you have multiple directives in a format string, you separate them with semi-colons ";".
- Text Box V Directive
The V directive creates a vertical scroll bar in a Text Box.
- Text Box W Directive
The W directive creates a word-wrapped a multi-line Text Box.
- Text Box Z Directive
The Z directive is used in combination with the S directive to make a spin control that does not display 0 values.
- Xdialog Text Control Methods
Alpha Anywhere provides the following functions for use with a Text Control on an Xdialog box.