picture
Topic group Related topics Example
A formatting template for text.
Property of
Entryfield, SpinBox, Text
Description
Specify the picture property with a character string called a template. A template can consist of
Picture template characters, which represent and modify individual characters in the text string.
Function symbols, which usually modify the entire text string. (For information on function symbols, see the function property.)
Literal placeholders (characters other than template codes), which are inserted into the text string.
Here are the picture template characters:
9 |
Restricts entry of character data to numbers. Restricts entry of numeric data to numbers and + and - signs |
# |
Restricts entry to numbers, spaces, signs and the SET POINT character. |
! |
Converts letters to uppercase |
$ |
Inserts a dollar sign or the symbol defined with SET CURRENCY TO instead of leading blanks |
% |
Inserts a percent sign as the right-most character of a numeric template |
* |
Inserts asterisks in place of leading spaces |
. |
Marks the position of the decimal point or the SET POINT character. |
, |
Separates thousands with a comma (or with another character indicated by SET SEPARATOR) |
A |
Restricts entry to alphabetic characters |
L |
Restricts entry to T, t, F, f, Y, y, N, or n, and converts it to uppercase |
N |
Restricts entry to letters, numbers and the underscore character. |
X |
Allows any character |
Y |
Restricts entry to Y, y, N, or n. Restricts display to Y and N |
You may include function symbols in a template by preceding them with the @ symbol. If you combine template characters and function symbols in the same template, list function symbols first and separate them from the template characters with a space.
If the data is longer than the length of the picture string, it is truncated to match.
When displaying a calculated or morphed field, use a picture that represents the field’s maximum size.
The $ or * picture codes can be used interchangeably with 9 in a numeric picture string. Any * in the string overrides any $ in the string.
For example;
When this template |
The value 12.45 |
Will display as |
99999.99 |
|
12.45 |
$$$$$.$$ |
|
$$$12.45 |
*****.** |
|
***12.45 |
99999.99% |
|
12.45% |