Delphi-PRAXiS
Seite 2 von 2     12   

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   GUI-Design mit VCL / FireMonkey / Common Controls (https://www.delphipraxis.net/18-gui-design-mit-vcl-firemonkey-common-controls/)
-   -   Delphi Combobox: nicht editierbar (https://www.delphipraxis.net/92413-combobox-nicht-editierbar.html)

toms 23. Jul 2009 09:57

Re: Combobox: nicht editierbar
 
Meinst du etwa so?

Delphi-Quellcode:
procedure TForm1.ComboBox1DrawItem(Control: TWinControl; Index: Integer;
  Rect: TRect; State: TOwnerDrawState);
begin
  with Control as TComboBox do
  begin
    if DroppedDown and (odSelected in State) then
      Canvas.Brush.Color := clHighlight
    else
      Canvas.Brush.Color := clWindow;

    Canvas.Font.Color := clWindowText;
    Canvas.FillRect(Rect);
    Canvas.TextOut(Rect.Left + 2, Rect.Top + 2, Items[Index]);
  end;
end;

LokutusvB 23. Jul 2009 10:14

Re: Combobox: nicht editierbar
 
Tut mir leid, habe dich wohl falsch verstanden :(.

Ja, genau das meinte ich. Noch ein wenig überarbeitet, und es ist perfekt für meine Ansprüche :). Danke für die schnell Hilfe!


Alle Zeitangaben in WEZ +1. Es ist jetzt 10:25 Uhr.
Seite 2 von 2     12   

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