Hi!
I have a problem. I cannot pass text chosen in combox to text field..
The problem is: how to do that if all menu items from combobox are read from cfg file.
ComboBox:
//
// systemBOX
//
this->systemBOX->FormattingEnabled = true;
resources->ApplyResources(this->systemBOX, L"systemBOX");
this->systemBOX->Name = L"systemBOX";
StreamReader^ plik= gcnew StreamReader("CONFIG\\systems.ini",System::Text::Encoding::Default);
while (linia=plik->ReadLine())
{
this->systemBOX->Items->Add(linia);
}
this->systemBOX->SelectedIndexChanged += gcnew System::EventHandler(this, &Form1::comboBox1_SelectedIndexChanged);
code for action after clicking the item in combobox
* systemBOX is a name of the combobox
* systemTEXT is a name of the textfield where I want to see option chosen from combobox
private: System::Void systemBOXComboBoxMenuItem_Click(System::Object^ sender, System::EventArgs^ e) {
systemTEXT->Text=((MenuItem^)sender)->Text;
}
Thx for help!