Is there any easy way to paint a listbox column without tagging cells? I am using the cell click command to get the column id so I can paint the entire column, now I just want to paint the clicked column.
Looking at man posts and docs all I see are row references for mass painting.
In CellBackgroundPaint do a
if currentColumn = column then
'no paint for you lot
where currentColumn is your selected column.
and use the CELLCLICK event to “remember” what column you “selected”
FUNCTION CELLCLICK(row as integer,column as integer) as Boolean
dim x as integer
if column<>currentColumn then
me.invalidatecell(-1,x) // UNPAINT the last selected column
me.invalidatecell(-1,currentColumn) // PAINT the new column
FUNCTION CELLBACKGROUNDPAINT(g as graphics,row as integer,column as integer) as boolean
if column=currentColumn then
this assumes the currentCOLUMN has been defined as a “global” variable somewhere
This will paint the selected column RED (ff0000) and unselected columns WHITE (ffffff)
This is for example only
INVALIDATECELL say "please redraw this cell … "
a ROW of -1 says “DO ALL THE ROWS for this COLUMN”
if you put -1 in the COLUMN it would be “DO ALL THE COLUMNS of this ROW”
if BOTH values are -1, this is says “REDRAW THE WHOLE DARN THING!”