![]() |
CheckListBoxDrawItem und TOwnerDrawState
Irgendwie sehe ich momentan das Problem nicht, allerdings habe ich noch nie in CheckListBox OnDrawItem genutzt
Delphi-Quellcode:
In der letzten Zeile kommt die Fehlermeldung
procedure TForm1.CheckListBoxDrawItem(Control: TWinControl; Index: Integer;
Rect: TRect; State: TOwnerDrawState); begin with (Control as TCheckListBox) do begin if odSelected in State then
Code:
[Fehler] uMain.pas(115): '[' erwartet, aber 'THEN' gefunden
|
AW: CheckListBoxDrawItem und TOwnerDrawState
Liegt an Deinem With ... die Checklistbox hat auch State
property State[Index: Integer]: TCheckBoxState read GetState write SetState; einfach den Parameter umbenennen
Delphi-Quellcode:
procedure TForm2.CheckListBox1DrawItem(Control: TWinControl; Index: Integer; Rect: TRect; aState: TOwnerDrawState);
begin with (Control as TCheckListBox) do begin if odSelected in aState then begin end; end; end; |
AW: CheckListBoxDrawItem und TOwnerDrawState
Könnte irgendjemand so freundlich sein und diesen Thread allen schicken die dieses "With" immer noch nutzen?
Bitte! Gruß K-H |
AW: CheckListBoxDrawItem und TOwnerDrawState
Danke, hab mir irgendwas in die Richtung gedacht, da sonst nichts verkehrt war.
|
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:04 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 by Thomas Breitkreuz