var I : integer; begin CheckListbox1.Items.BeginUpdate; try for I := CheckListbox1.Items.Count-1 downto 0 do if CheckListbox1.Checked[I] then CheckListbox1.Items.Delete[I]; finally CheckListbox1.Items.EndUpdate; end; end;
procedure TForm1.Button1Click(Sender: TObject); var i: integer; begin for i := checklistbox1.items.Count - 1 downto 0 do begin if checklistbox1.Checked[i] then checklistbox1.Items.Delete(i); end; end;
Vous n’avez pas trouvé la réponse que vous recherchez ?
Posez votre questionvar I: integer; begin with CheckListBox1 do for I := 0 to Pred(Items.Count) do if Checked[I] then begin Items.Delete[I]; asm DEC I end; end; end;
var I: integer; begin with CheckListBox1 do for I := Pred(Items.Count) downto 0 do if Checked[I] then Items.Delete[I]; end;
404 not found.
try CheckListBox1.Items.BeginUpdate; // Traitement ... finally CheckListBox1.Items.EndUpdate; end;
for nI:= 0 to Memo1.Lines.Count - 1 do ShowMessage(IntToStr(nI)); for nI:= 0 to Pred(Memo1.Lines.Count) do ShowMessage(IntToStr(nI));