Verovatno je ovo bilo u pitanju:
Code:
procedure TfrmMain.lstTestDrawItem(Sender: TCustomListView;
Item: TListItem; Rect: TRect; State: TOwnerDrawState);
var
lstT: TListView;
intNoWidth: Integer;
strNoText: String;
begin
if Sender is TListView then
begin
lstT := Sender as TListView;
strNoText := IntToStr(Item.Index + 1) + '. ';
intNoWidth := Length(IntToStr(lstT.Items.Count)) + 3;
while Length(strNoText) < intNoWidth do
strNoText := '0' + strNoText;
strNoText := strNoText + Item.Caption;
lstT.Canvas.TextRect(Rect, Rect.Left + 1, Rect.Top + 1, strNoText);
end;
end;
Someone's sitting in the shade today because someone planted a tree a long time ago.