AGB  ·  Datenschutz  ·  Impressum  







Anmelden
Nützliche Links
Registrieren
Zurück Delphi-PRAXiS Code-Bibliothek Library: VCL / WinForms / Controls Delphi ListBox mit Scrollbalken (Horizontal)
Thema durchsuchen
Ansicht
Themen-Optionen

ListBox mit Scrollbalken (Horizontal)

Ein Thema von Sharky · begonnen am 3. Aug 2005 · letzter Beitrag vom 3. Sep 2005
 
Benutzerbild von The-X
The-X

Registriert seit: 30. Aug 2003
Ort: Woffelsbach / user.exe ;)
377 Beiträge
 
Delphi 7 Personal
 
#2

Re: ListBox mit Scrollbalken (Horizontal)

  Alt 4. Aug 2005, 00:27
Hat die ListBox nicht sogar ne Property Namens ScrollWidth?
Delphi-Quellcode:
procedure SetScrollWidth(ListBox: TListBox);
var
  DC: HDC;
  Size: TSize;
  w, i, offset: Integer;
begin
  offset := 2 * GetSystemMetrics(SM_CXFRAME) + GetSystemMetrics(SM_CXVSCROLL);
  with ListBox do
  begin
    DC := GetDC(Handle);
    try
      SelectObject(DC, Font.Handle);
      w := 0;
      for i := 0 to Items.Count - 1 do
      begin
        if GetTextExtentPoint32(DC, PChar(Items[i]),
          StrLen(PChar(Items[i])), Size) then
          if w < Size.cx + offset then
            w := Size.cx + offset;
      end;
      ScrollWidth := w;
    finally
      ReleaseDC(Handle, DC);
    end;
  end;
end;
mal irgendwo durch Zufall gefunden (wenn nicht sogar hier)
WGET ftp://root@fbi.us.gov/secret/worldreign.exe <- damit werde ich die Weltherrschaft an mich reissen!
=> irc://irc.quakenet.eu.org:6667/delphi.de da werden Sie auch (manchmal) geholfen
  Mit Zitat antworten Zitat
 

Forumregeln

Es ist dir nicht erlaubt, neue Themen zu verfassen.
Es ist dir nicht erlaubt, auf Beiträge zu antworten.
Es ist dir nicht erlaubt, Anhänge hochzuladen.
Es ist dir nicht erlaubt, deine Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.
Trackbacks are an
Pingbacks are an
Refbacks are aus

Gehe zu:

Impressum · AGB · Datenschutz · Nach oben
Alle Zeitangaben in WEZ +1. Es ist jetzt 10:08 Uhr.
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz