Developer technologies | Windows Forms
A set of .NET Framework managed libraries for developing graphical user interfaces.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
how to change textbox font size with combobox value in c++ windows form application
You can do something like :
private: System::Void comboBox1_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e)
{
ComboBox^ comboBox = (ComboBox^)(sender);
if (comboBox->SelectedItem != nullptr)
{
int nSize = int::Parse(comboBox->SelectedItem->ToString());
textBox1->Font = gcnew System::Drawing::Font(textBox1->Font->FontFamily, nSize);
// etc...
}
}