Dear,
i want add the new item in combobox at run time,whiout databas.
i want user enter the new item in comobox.
plese help me
student784
0
Newbie Poster
Recommended Answers
Jump to PostUse form load event to add stuff at runtime.
Private Sub Form1_Load(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Load 'add items in combobox here at runtime End Sub
"i want user enter the new item in comobox." Sorry, I only speak English, and don't know …
Jump to PostTry this
Private Sub Combo1_KeyPress(ByVal sender As Object, ByVal e As System.Windows.Forms.KeyPressEventArgs) Handles Combo1.KeyPress If e.KeyChar=Chr(Keys.Enter) Then Me.Combo1.Items.Add(Me.Combo1.Text) 'Any text entered into the combobox text will be added into the combobox item list after hiting Enter Key End If End Sub
Jump to Posti guess you cannot store permanently any inputed texts into the combobox item list at runtime UNLESS you decide to have a database or if you load it first at design time.
If you want a permanent data to be loaded in your combobox then go for a database, …
All 10 Replies
crazyhorse09
9
Junior Poster in Training
c0deFr3aK
1
Junior Poster in Training
student784
0
Newbie Poster
student784
0
Newbie Poster
student784
0
Newbie Poster
student784
0
Newbie Poster
verceti
0
Newbie Poster
student784
0
Newbie Poster
razmca
0
Newbie Poster
c0deFr3aK
1
Junior Poster in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.