25. ListBox - Coding
• It’s a runtime error if selecting nothing and then pressing
button2. Otherwise it works properly.
private: System::Void button2_Click(System::Object^ sender,
System::EventArgs^ e)
{
textBox1->Text =listBox1->SelectedItem->ToString();
}
51. CheckedListBox
• And ofcourse, we can do this!
private: System::Void button1_Click(System::Object^
System::EventArgs^ e)
{
checkedListBox1->Items->Add(textBox1->Text);
}
sender,