Getting Started with Windows Forms ComboBoxAdv(Classic)
30 May 20234 minutes to read
This section briefly describes how to design a ComboBoxAdv Control in a Windows Forms Application.
- Adding a ComboBoxAdv Control
- Configuring the ComboBoxAdv Control
Adding ComboBoxAdv Control
- Create a new Windows Forms Application Project in VS IDE through New Project Wizard.
- Drag and drop the ComboBoxAdv control in the Form from Toolbox.
Configuring ComboBoxAdv Control
The most commonly used settings of the ComboBoxAdv control can be configured either through Designer using the Smart tag or through the Properties window or through code.
To add ComboBoxAdv Control to a Windows Forms Application through code behind, follow the given steps.
- Include the namespaces “Syncfusion.Windows.Forms” and “Syncfusion.Windows.Forms.Tools”.
//Namespaces.
using Syncfusion.Windows.Forms.Tools;
using Syncfusion.Windows.Forms;
'Namespaces.
Imports Syncfusion.Windows.Forms
Imports Syncfusion.Windows.Forms.Tools
- Create an instance of the ComboBoxAdv control and add it to the Form.
//Creates ComboBoxAdv instance.
private Syncfusion.Windows.Forms.Tools.ComboBoxAdv comboBoxAdv1;
this.comboBoxAdv1 = new ComboBoxAdv();
'Creates ComboBoxAdv instance.
Private comboBoxAdv1 As Syncfusion.Windows.Forms.Tools.ComboBoxAdv
Me.comboBoxAdv1 = New ComboBoxAdv()
- Items can be added to ComboBoxAdv through String Collection Editor as it was done in Windows ComboBox control.
//Adding items to ComboBoxAdv
this.comboBoxAdv1.Items.Add(100);
this.comboBoxAdv1.Items.Add(200);
this.comboBoxAdv1.Items.Add(300);
'Adding items to ComboBoxAdv
Me.comboBoxAdv1.Items.Add(100)
Me.comboBoxAdv1.Items.Add(200)
Me.comboBoxAdv1.Items.Add(300)
- Finally add ComboBoxAdv to the form.
//Adding ComboBoxAdv to form
this.Controls.Add(this.comboBoxAdv1);
'Adding ComboBoxAdv to form
Me.Controls.Add(Me.comboBoxAdv1)