Private
procedure SetHorizontalScrollBar(lb : TListBox) ;
procedure SetHorizontalScrollBar(lb : TListBox) ;
var
j, MaxWidth: integer;
begin
MaxWidth := 0;
for j := 0 to lb.Items.Count - 1 do
if MaxWidth < lb.Canvas.TextWidth(lb.Items[j]) then
MaxWidth := lb.Canvas.TextWidth(lb.Items[j]) ;
SendMessage(lb.Handle, LB_SETHORIZONTALEXTENT, MaxWidth + 5, 0) ;
end;
procedure TForm1.FormCreate(Sender: TObject);
begin
SetHorizontalScrollBar(ListBox1) ;
end;
Yatay Kaydırma Çubuğuna sahip ListBox
-
- Kıdemli Üye
- Mesajlar: 574
- Kayıt: 01 Şub 2004 12:29
- Konum: Erdemli - MERSİN