LISTING 1

n_select variables protected: datawindow idw_dw string is_notselected
public function boolean of_init (datawindow adw_dw, string as_col);
string ls_prop[] int li, li_cnt int li_x int li_w =
55 string ls_color string ls_name string ls_rest_syn string ls_coltype string ls_syn
idw_dw = adw_dw
ls_rest_syn = 'create compute(band=detail alignment="0" border="0" format="[general]" ' &
+ 'width="' + string(li_w) + '" slideleft=yes 'ls_prop = { 'y', 'height', 'font.face',
'font.height', 'font.family', &
'font.pitch', 'font.charset',
'background.mode', 'background.color' }
for li = 1 to upperBound( ls_prop)

ls_rest_syn += ls_prop[li] + '="' + idw_dw.describe(as_col + '.' + ls_prop[li]) + '" ' next
ls_color = idw_dw.describe( as_col + '.color')
li_x = Integer( idw_dw.describe( as_col + '.x')
)
ls_coltype = idw_dw.describe( as_col +
'.coltype') // expected char(xx)
li_cnt = Integer( Mid( ls_coltype, 6,
pos(ls_coltype, ')', 1) - 6 ) )

for li = 1 to li_cnt ls_syn = ls_rest_syn & + ' x="' + String(li_x + li_w*(li - 1)) +
'" ' & + ' expression="mid( ' + as_col + ', ' + String(li) + ', 1)" ' &
+ ' color="' + ls_color + '~tif(mid(select,' + string(li) + ',1)=~'1~',rgb(255,0,0),' + ls_color +')" ' &
+ 'name = c$' + string(li) &
+ ')'

idw_dw.modify(ls_syn) next
idw_dw.modify('destroy ' + as_col)
is_notSelected = Fill('0', li_cnt)
return true

LISTING 2

public subroutine of_select (integer ai_start,
integer ai_len, long al_row);
string ls_data

ls_data = idw_dw.getItemString(al_row, 'se
_lect')
if isNull(ls_data) then ls_data =
is_notSelected
idw_dw.setItem(al_row, 'select',
Replace(ls_data, ai_start, ai_len, Fill('1',
ai_len) ) )

LISTING 3 

public subroutine of_clear (long al_row); idw_dw.setItem( al_row, 'select', is_notSelected )