List Box O Directive {@} Operator

Syntax

{@ @ | N | # | $( Character [ ? A ] ) [, M | # | $( Character ) [ ? B ]] }

Arguments

@

Character. Owner draw formatting is embedded in the text.

N

Numeric. An integer value representing the character position to start displaying text.

#

Character. Returns the current row position when used in a list.

Character

Character. Returns the position of the next specified character. Do not specify a character that will return a value of zero (0).

M

Numeric. Optional. An integer value representing the character position to stop displaying text. If not specified, the display continues to the end of the string.

A

Numeric. Optional. An integer value representing an offset.

B

Numeric. Optional. An integer value representing an offset.

Description

The {@} operator is the 'text select' operator. It selects text from the input value (i.e. from the list of entries that are to be displayed by the list box).

Example 

tab1 = "{T=1}"
tab2 = "{T=2}"
font2 = "{F=Arial,8,B}"
font1 = "{F=Arial,8}"
rowcolor1 = "{B=Blue White,Green}"
rowcolor2 = "{C=Black,White}"
image1 = "{I:'a5_color_red'}"
image2 = "{I:'a5_color_bright_green'}"
image3 = "{I:'a5_color_blue'}"
image4 = "{I:'a5_color_yellow'}"
dim data_selected as N
data_selected = 1
data = image1+rowcolor1+font2+"Boston"+font1+tab1+"Red Sox"+tab2+"Baseball" + crlf()+\
image2+"Boston"+tab1+"Celtics"+tab2+"Basketball" + crlf()+\
image3+"Boston"+tab1+"Patriots"+tab2+"Football" + crlf()+\
image4+rowcolor1+font2+"New York"+font1+tab1+"Yankees"+tab2+"Baseball" + crlf()
ui_dlg_box("Columns",<<%dlg%
%O={@@}%.80,10data_selected^#data;
{lf};
.80data_selected;
%dlg%)

See Also