List Box O Directive {I} Operator

Syntax

{I= [ 0 | M | @$( Character )? A | @:( Character )? B ] | [ :' Image_Name ' ] }

Arguments

0

Numeric. The zero value indicates that the image is selected using

M

Numeric. An integer value that selects image M (or the value calculated by @$( Character ) to display an image from the previous %I% directive.

Character

Character Type. When used with the @$ or :$ operators returns the position of the first Character found in the current row of the CR-LF delimited list of list box entries.

A

Numeric. Usually required when the @$ operator is used. Determines the offset from the position of Character to find an number letter, which is interpreted as a number.

B

Numeric. Usually required when the :$ operator is used. Determines the offset from the position of Character to find the beginning of a filename. The remainder of the row entry is interpreted as the filename.

Image_Name

Character. The name of the bitmap image to display, surrounded by single quotes.

Description

The {I} operator is used to specify images within an owner draw (O) directive.

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%)
images/XD_List_Box_I_operator.gif
result = ui_dlg_box("bitmap button",<<%dlg%
%I=$sys_leftarrow,$sys_rightarrow,$sys_uparrow,$sys_downarrow;O={I=0} go {@1}%.32,10direction^#{left,right,up,down}|
;
|
%dlg%)
images/XD_List_Box_I0__.gif

See Also