procedure TForm1.CheckListBox1ClickCheck(Sender: TObject); begin if CheckListBox1选中状态 then Combobox1.Items.Add(CheckListBox1.Items[ CheckListBox1.ItemIndex]); end;
//不知道你要的取消是不是这个意思 procedure TForm1.CheckListBox1ClickCheck(Sender: TObject); begin if CheckListBox1.Items.checked=ture then Combobox1.Items.Add(CheckListBox1.Items[ CheckListBox1.ItemIndex]); else for i=0 to Combobox1.items.count-1 do begin if CheckListBox1.Items.Strings[CheckListBox1.ItemIndex]=Combobox1.Items.string[i] then ComboBox1.Items.Delete(i); end; end;
procedure TForm1.CheckListBox1ClickCheck(Sender: TObject);
begin
Combobox1.Items.Add(CheckListBox1.Items[ CheckListBox1.ItemIndex]);
end;
再个就是用add不能看到combobox中的内容。谢谢你了
begin
if CheckListBox1选中状态 then
Combobox1.Items.Add(CheckListBox1.Items[ CheckListBox1.ItemIndex]);
end;
//不知道你要的取消是不是这个意思
procedure TForm1.CheckListBox1ClickCheck(Sender: TObject);
begin
if CheckListBox1.Items.checked=ture then
Combobox1.Items.Add(CheckListBox1.Items[ CheckListBox1.ItemIndex]);
else
for i=0 to Combobox1.items.count-1 do
begin
if CheckListBox1.Items.Strings[CheckListBox1.ItemIndex]=Combobox1.Items.string[i] then ComboBox1.Items.Delete(i);
end;
end;