Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,306 members, 7,808,038 topics. Date: Thursday, 25 April 2024 at 05:13 AM

Combobox Control - Programming - Nairaland

Nairaland Forum / Science/Technology / Programming / Combobox Control (700 Views)

(2) (3) (4)

(1) (Reply) (Go Down)

Combobox Control by maekhel(m): 2:06pm On Oct 21, 2014
VB.Net controls are located in the Toolbox of
the development environment, and you use
them to create objects on a form with a
simple series of mouse clicks and dragging
motions. The ComboBox control , which lets
the user choose one of several choices.
The user can type a value in the text field or
click the button to display a drop down list.
In addition to display and selection
functionality, the ComboBox also provides
features that enable you to efficiently add
items to the ComboBox.
Add item to combobox
ComboBox1.Items.Add(“Sunday”)
How to set the selected item in a
comboBox
You can set which item should shown while
it displaying in the form for first time.
comboBox1.Items.Add(“test1″)
comboBox1.Items.Add(“test2″)
comboBox1.Items.Add(“test3″)
comboBox1.SelectedItem = “test3″
or
ComboBox1.SelectedItem =
ComboBox1.Items(1)
or
comboBox1.SelectedIndex =
comboBox1.FindStringExact(“test3″)
How to retrieve value from ComboBox in
VB.Net
If you want to retrieve the displayed item to
a string variable , you can code like this
Dim var As String
var = ComboBox1.Text
Or
Dim item = Me.comboBox1.GetItemText
(Me.comboBox1.SelectedItem)
MessageBox.Show(item)
How to remove an item from ComboBox in
VB.Net
You can remove items from a combobox in
two ways. You can remove item at a the
specified index or giving a specified item by
name.
ComboBox1.Items.RemoveAt(1)
The above code will remove the second item
from the combobox.
continue reading: http://tutorialslodge.com/combobox-control/
Re: Combobox Control by Nobody: 4:48pm On Oct 29, 2014
Are you a guru or beginner programmer.
Re: Combobox Control by maekhel(m): 8:07am On Oct 30, 2014
Oruns007:
Are you a guru or beginner programmer.
the writer is an intermediate programmer.
Re: Combobox Control by Nobody: 1:11am On Oct 31, 2014
Erm, am also new into VB.NET also but i can write console apps, database apps and windows apps. I have written calculator apps, staff-records(its a database app that stores staff details), student records, web browser and many other. Why don't you hit me up on facebook: "Oruns Dru"(my dp has a monster behind it) so we could rub minds.

(1) (Reply)

What Are The Different E-mail Format For Nigerian Companies? / Beginners Guide To HTML/CSS / If Microsoft Went Open Source With Its Os ...

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 7
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.