Nabend,
folgender Code funktioniert 1a bei der lstBooks, aber die lstBookItems bleibt vollkommen unberührt.
Delphi-Quellcode:
procedure TfrmMain.CheckBox2Click(Sender: TObject);
var
i: integer;
begin
for i := 0 to lstBooks.Items.Count-1 do
lstBooks.Items[i].Checked := CheckBox2.Checked;
refreshBooks(self);
end;
procedure TfrmMain.CheckBox3Click(Sender: TObject);
var
i: integer;
begin
for i := 0 to lstBookItems.Items.Count-1 do
lstBookItems.Items[i].Checked := CheckBox3.Checked;
refreshBooks(self);
end;
Ich hoffe das ist irgendein Fehler, den ich einfach übersehe weil ich kaputt bin.
Hier das
DFM dazu...
Delphi-Quellcode:
object lstBookItems: TListView
Left = 243
Top = 50
Width = 537
Height = 352
Anchors = [akLeft, akTop, akRight, akBottom]
Checkboxes = True
Columns = <
item
Caption = 'test'
Width = 200
end
item
Caption = 'test1'
Width = 150
end
item
Caption = 'test2'
Width = 140
end>
ColumnClick = False
GridLines = True
ReadOnly = True
RowSelect = True
SmallImages = imgSmall
TabOrder = 0
ViewStyle = vsReport
end
object lstBooks: TListView
Left = 26
Top = 50
Width = 211
Height = 352
Anchors = [akLeft, akTop, akBottom]
Checkboxes = True
Columns = <
item
Caption = 'test0'
Width = 186
end>
ColumnClick = False
GridLines = True
ReadOnly = True
RowSelect = True
SmallImages = imgSmall
TabOrder = 1
ViewStyle = vsReport
OnClick = refreshTest
end
Danke!