vielen dank für deine schnelle antwort. leider verstehe ich das beispiel nicht so ganz:
ich habe ihn versuch einzubauen:
Delphi-Quellcode:
procedure Tmylistbox.Draw;
var
i:Integer;
s:Char;
y,selY,indexdeserstensichtbarenEintrags:Integer;
begin
HeaderCaption.DrawCaption('',-1,-1);
FootCaption.DrawCaption(IntTostr(itemIndex)+'\'+IntTostr(Items.count) ,-1,-1);
Paint.DrawRect(posX,posY,200,150);
s:=#0; y:=-1;
if items <> NIL then begin
for i:=indexdeserstensichtbarenEintrags to items.count-1 do begin
with TmyListItem(Items.Items[i]) do begin
if Caption.isSel = True then begin
s:='*';
SetIndex(i);
FootCaption.fCaption:='Einträge: ' + IntTostr(itemIndex)+'\'+IntTostr(Items.count)+'\' + IntTostr(displaycount) ;
sely:=Tmylistitem(items.items[itemindex]).Caption.fpos.y-displayh
end
else begin
s:=' ';
SetIndex(-1);
end;
indexdeserstensichtbarenEintrags := ((items.Count-(displayh div 20)) * caption.fpos.y) div 20;
Caption.DrawCaption(s,0,);
end;
end;
end;
FootCaption.DrawCaption('' ,-1,-1);
// FootCaption.fCaption:='Einträge: ' + IntTostr(itemIndex)+'\'+IntTostr(Items.count);
end;
im moment bin ich am überlegen wo ich indexdeserstensichtbarenEintrags ermitteln sollte
und was ist YAnzeigePosition ?