SpeakComputers.com
Home
Software
Electronics
Desktop Computers
Laptops
Games
Handheld Devices
Mobile Phones
Cameras
Camcorders
Printers
Books
Software Downloads 2012 Software Mac Software Security Student Editions Windows 7 Office 2010
ASP.NET C# VB.NET C++ .NET Infragistics DevComponents

C++ ComboBox Control.

The C++ ComboBox control is typically used for selecting text field options from a the list. If the dropdownstyle is set to dropdownlist the user can only select one of the dropdown items within the list. If the dropdownstyle is set to dropdown, the user can enter text into the text field. If the dropdownstyle is set to simple, the ComboBox control acts as a listbox control with a searchable textbox.

Namespace: System::Windows::Forms
System.Windows.Forms (in system.windows.forms.dll)

Creating an new C++ Windows forms ComboBox.
ComboBox^ combobox = gcnew ComboBox;

Assigning a new location for the C++ Windows Forms ComboBox.
combobox->Location = Point(20,20);

Assigning a text value to the C++ ComboBox control.
combobox->Text = "Select one";

Adding a C++ ComboBox control to the form.
Controls->Add(combobox);

Creating a Selected Index Changed Event for the C++ ComboBox control.
this->comboBox1->SelectedIndexChanged += gcnew System::EventHandler(this, &Form1::comboBox1_SelectedIndexChanged);

Responding to the C++ ComboBox Selected Index Changed event.
private: System::Void comboBox1_SelectedIndexChanged(System::Object^ sender, System::EventArgs^ e)
{
MessageBox::Show(comboBox1->SelectedItem->ToString());
}

Adding items to the C++ ComboBox control.
String^ str = "DELL";
String^ str2 = "HP";
String^ str3 = "SONY";
combobox->Items->AddRange(gcnew cli::array<System::String^ >(3) {str, str2, str3});

C++ ComboBox control Tutorial.
Computer Security
AntiVirus Software
Internet Security
Parental Controls
Backup & Recovery
Computer Protection
Anti Malware
Photo & Video
Photo & Video Editing
Video Music
Desktop Publishing
Professional Design
Home Publishing
Clipart
Business & Accounting
Accounting
Payroll
Check Printing
TAX
H&R Block
Microsoft Office
Design
Graphic Design
Home Design
Garden Design
Interior Design
Computer Aided Design
3D Design
Students & Teacher
Adobe
Microsoft Office
Dragon Naturally Speaking
Corel Draw
Serif
Student/Teacher Software
Copy Right 2006 SpeakComputers.com - All Rights Reserved.
Home About Privacy Policy Resouces