![]() |
AW: TComboboxEx - Icons sind schwarz
@ConnorMcLeod
Vielen Dank für den Codeauszug, werd es am Montag gleich probieren. Meinst du ".ico"?? - wenn ja, kein Problem, dann wandel ich die Bilder um. Gruß |
AW: TComboboxEx - Icons sind schwarz
Nein, ich musste die Icons für bestimmte Extensions ermitteln. Nicht aus Grafikdateien auslesen, sondern von Windows anfordern.
|
AW: TComboboxEx - Icons sind schwarz
So, habs heute hinbekommen, ka was falsch war, hab einfach nochmal neu angefangen und es hat funktioniert.
Hier der Quellcode (wenn noch jemand anders das selbe problem hat)
Code:
procedure TForm5.FormShow(Sender: TObject);
var combEx : TComboBoxEx; myImages : TImageList; image : TBitmap; begin try combEx := TComboBoxEx.Create(Self); combEx.Parent := Self; combEx.Visible := true; combEx.ItemHeight := 20; combEx.Style := csExDropDownList; combEx.Align := alLeft; combEx.DoubleBuffered := true; image := TBitmap.Create(); myImages := TImageList.CreateSize(16, 11); image.LoadFromFile('Name.bmp'); myImages.Add(image,nil); image.LoadFromFile('Name2.bmp'); myImages.Add(image,nil); combEx.Images := myImages; combEx.ItemsEx.AddItem('1. Eintrag', 0, 0, -1, 0, nil); combEx.ItemsEx.AddItem('2. Eintrag', 1, 1, -1, 0, nil); combEx.ItemIndex := 0; except on E:Exception do begin MessageDlg(e.Message, mtWarning, [mbOK], 0); end; end; end; Gruß |
Alle Zeitangaben in WEZ +1. Es ist jetzt 06:48 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