Owner Draw O Directive Command Summary
Description
The following table summarizes all of the owner-draw string commands:
{@start ,end}
Selects text from start to end character positions. Start and end can include + and - arithmetic operators, and the $ substring operator. For example, to display text from position 1 to 10 use {@1,10}. To display text up to the first comma, use {@1,$(,)}.
$(substring)
Returns the character position of substring
#
Returns the row number. For example, to display the row number in a list box, use {@#}
I=imagenumber I=:imagename
Specifies that the owner-draw string should display an image. The image to display can either be specified by number, or by name (by specifying a colon after the equals sign).
If you specify the image by number, you must include an imagelist command in the control's format string. For example, to specify an image by number (the entire format string is shown here):
%I=bluefloppy;O={I=1}%
To specify the image by name:
%O={I=:bluefloppy}%
You can use the @ and $ operators to the right of the = sign so that the image name or number is derived dynamically.
L_R_T_B_C>{J=[L|R] [T|B] [C]}
Justifies the output generated by the owner-draw string. For example, {J=LC}. Justification options are:
"L" = left or "R" = right
"T" = top or "B" = bottom
"C" = center (both horizontally and vertically)
"LC" = left, vertical center
"RC" = right, vertical center
{F=[+|-] [B|I|U]}
Starts (+) or stops (-) bold (B), italic (I), or underline (U).
{F=fontname,size}
Specifies the font to be used for text generated by the owner-draw string. For example, {F=times new roman,10}. The font can be derived from the input text using a @[,] directive. For example, {F=@1} means that the font is derived from the entire text of the input value. So if the input text is 'Arial,12', the font is 'Arial,12'. {F=@1,$(:)-1} means that the input text, up to the first colon specifies the font to use.
{B= [, [,]])
Change the background color for text that follows. Note that there are up to three comma separated colors because the button, list box, or combo box control has three states: normal, selected, and disabled.
{B= [, [,]])
Change the background color for text that follows. Note that there are up to three comma separated colors because the button, list box, or combo box control has three states: normal, selected, and disabled.
{C= [, [,]])
Set the foreground color of text that follows.
{LF}
Inserts a line break in the output string.
Inches>{T=}
Tab to position (in inches) and start the text/image that follows at this horizontal offset. For example, {T=0.5} will print the owner-draw output that follows at an offset of 0.5 inches.
{U}
Underlines the following character. Useful for marking "hot character" for a button.
See Also