I've a problem with this. Only the first (item 0) row gets visibly drawn. The others are drawn (output to console window). If the list is scrolled, the others become visible as they pass the first visible position.
I've had this before and fixed it, but can't remember how and the code is else where
procedure TfrmChgLstCnst.clbAvailableDrawItem(Control: TWinControl;
Index: Integer; Rect: TRect; State: TOwnerDrawState);
begin
clbAvailable.Canvas.FillRect(Rect);
clbAvailable.Canvas.TextRect( Rect, 25, 0, clbAvailable.Items[index]);
writeln(inttostr(index), clbAvailable.Items[index]);
end;
I've had this before and fixed it, but can't remember how and the code is else where
procedure TfrmChgLstCnst.clbAvailableDrawItem(Control: TWinControl;
Index: Integer; Rect: TRect; State: TOwnerDrawState);
begin
clbAvailable.Canvas.FillRect(Rect);
clbAvailable.Canvas.TextRect( Rect, 25, 0, clbAvailable.Items[index]);
writeln(inttostr(index), clbAvailable.Items[index]);
end;