Text Box Formatting Codes

Description

The following table summarizes the formatting options for text boxes. Some of these codes turn the text box into a "smart" field. A smart field has an icon at the right edge of the text box. When the user clicks on the icon, a pop-up window helps the user fill in a value into the text box. Other of the formatting codes transform the text box into a special kind of text box. The formatting options are:

 Formatting Options:

  •  %f%

    Converts a text box into a file select "smart field". When the user clicks the smart field button, a standard Windows file select dialog is displayed. The filename that the user selects is entered into the smart field.

    Doc files(*.doc)%.32filename
  •  %s%

    Converts a text box into a spin control. When the user clicks on the Up or Down buttons, the value in control is increased or decreased.

    %s1,10%.32spin
    In this example 1 and 10 represent the minimum and maximum values in the spin control.
  •  %d %

    Converts a text box into a field select "smart field". When the user clicks on the smart field button, Alpha Anywhere displays a list of fields for the primary table of the session.

    %d%.32field
  •  %p %

    Converts a text box into a user defined "smart field". You can specify the bitmap to use for the smart field icon, and you can specify the function to execute when the user presses the smart field button.

    %P=popup.calendar( dtoc(v1)); I=popup.calendar%.30date1
  •  %L %

    Converts a text box into an Xbasic code editor.

    %L%.80,15code
  •  %M%

    For a text box control: converts a text box into a multi-line text box. For a list box control: converts a list box into a multi-select list box. Note: %ME% also converts a list box into a mult-select list box, but the 'E' directive enables drag-select for multiple item selection, shift+click, and ctrl+click.

    textbox: %M%.80,15text
    list box: %M%.80,15sel^#list
  •  %MW%

    Converts a text box into a multi-line, word-wrapped text box that accepts the Enter key. When the user presses Enter, Alpha Anywhere will advance to a new line in the text box.

    %MW%.80,15text

The usage of each of these formatting codes is described below.

Limitations

Desktop applications only

See Also