Default Value in Combobox
2013-11-25, 02:44 AM,
(This post was last modified: 2013-11-25, 02:48 AM by JaxTeller.)
#1
I added a combobox, i selected DropDownStyle to DropDownList ( http://img585.imageshack.us/img585/5938/8h30.png ) and i want the default value to be the first item from the combobox because the default is blank http://img32.imageshack.us/img32/1246/24kc.png

For example like when you save in photoshop
[Image: x46.png]

Visual studio 2010
Reply
2013-11-25, 02:49 AM,
#2
If i remember correctly clcik on combobox and there should be "text" field empty, put there the info, not in the name but in the text section.
I might be wrong as it passed alot of time since I used combobox in vb
Reply
2013-11-25, 02:51 AM,
#3
(2013-11-25, 02:49 AM)pepeneo Wrote: If i remember correctly clcik on combobox and there should be "text" field empty, put there the info, not in the name but in the text section.
I might be wrong as it passed alot of time since I used combobox in vb
yes this works but only if i have the DropDownStyle set to DropDown (default)
Reply
2013-11-25, 03:00 AM,
#4
add this

Private Sub MenuGenerator_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ComboBox1.SelectedIndex = 0
End Sub
Latest Thanks - View all

JaxTeller(2013-11-25 03:20 AM) 
Reply
2013-11-25, 03:21 AM,
(This post was last modified: 2013-11-25, 03:22 AM by JaxTeller.)
#5
(2013-11-25, 03:00 AM)gatsu Wrote: add this

Private Sub MenuGenerator_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
ComboBox1.SelectedIndex = 0
End Sub

A*M*A*Z*I*N*G T*H*A*N*K*S
Reply


Possibly Related Threads...
Thread Author Replies Views Last Post
  [HELP]How to Change default slider on a wordpress theme? fieldy2012 0 315 2014-05-16, 07:41 PM
Last Post: fieldy2012
  [GET] WWW Redirect via .htaccess (Make your default domain start with www.) Removed 14 1,255 2013-10-01, 01:47 AM
Last Post: Removed
  Default .NET Framework Version for VB2010 sinefix 5 771 2013-08-13, 01:09 PM
Last Post: sinefix
  ComboBox - GetElementByID GraveYard 0 520 2013-07-29, 03:17 AM
Last Post: GraveYard




About Us | Contact Us | CPA Elites | Advertise | Stats | Staff Team

© 2013-2017 CPA Elites Ltd
Enhanced by MyBB and WallBB
Return to top