萬盛學電腦網

 萬盛學電腦網 >> 網絡編程 >> asp.net編程 >> C# 選擇器 checkedListBox 移動勾選

C# 選擇器 checkedListBox 移動勾選

  private void buttonSendChoickedToNosend_Click(object sender, EventArgs e)

  {

  int end = this.checkedListBoxSend.Items.Count;

  for (int i = 0; i < end ; i++)

  {

  if (checkedListBoxSend.GetItemChecked(i))

  {

  this.checkedListBoxSiftEmail.Items.Add(checkedListBoxSend.GetItemText(checkedListBoxSend.Items[i]));

  }

  }

  for (int j = 0; j < this.checkedListBoxSend.CheckedIndices.Count;)

  {

  this.checkedListBoxSend.Items.RemoveAt(this.checkedListBoxSend.CheckedIndices[0]);//刪除

  }

  }

copyright © 萬盛學電腦網 all rights reserved