combo box
Post on 17-Dec-2014
277 Views
Preview:
DESCRIPTION
TRANSCRIPT
Electroteam__@hotmail.com
Interesting Interesting
EducationEducationElectro-Team
ComboBox
A ComboBox control is a combination of a TextBox and a ListBox control
Open new project
Add ComboBox \ Item property \ press ... Button \ type White, Red, Black & Yellow
Add items from Design window
Run Time
You can add same items at run-time
Another method for adding items
Add items by Code
Add 1 Button and Fix it
Run Time
Sb could be anything else like X, Y or Z
Add another Button and Fix it
Run Time
Double click on Button2 and type yellow phrase
Add GroupBox, Button and TextBox
Run Time
TextBox Will have the same value as ComboBox
Error
If there is no selected item ComboBox1.SelectedIndex will be
-1 and this will produce an Error
ComboBox1.Items
White
Red
Black
yellow
ComboBox1.SelectedIndex
0
1
2
3
Dim X As String =ComboBox1.Items(ComboBox1.SelectedIndex) TextBox1.Text = X
Produced by
Electro-Team
Electroteam__@hotmail.com
top related