PaintCellText(g As Graphics, Row As Integer, Column As Integer, x As Integer, y As Integer) As Boolean
The parameter g is a Graphics object that corresponds to the text drawing area of the cell identified by Row, Column. This does not necessarily correspond to the entire cell content area, for example, if you use a row picture in the cell.
In order for this event handler to be called, the cell itself must have been given a value, even if it is blank.
Is this last sentence actually still the case? Just now looking at my code which loads up my listbox, I observe that what it actually does is to write a RowTag and two CellTags in every row, and it doesn’t write e.g. a space in each column to force the event to occur.
The listbox functions exactly as I expect it to, with all the drawing being done in the PaintCellText event. This event must therefore be firing for all visible cells, but this appears to me to contradict the documentation.
18 posts - 7 participants