Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsVB SyntaxEnterprise DevelopmentDatabase AccessControlsCOMWin APICrystal ReportDeploymentGeneralGeneral 2
Related Topics
VB.NET / ASP.NETMS SQL ServerMS AccessOther Database ProductsMore Topics ...

VB Forum / General 2 / September 2006



Tip: Looking for answers? Try searching our database.

combobox issue

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
gb - 30 Sep 2006 17:05 GMT
Hello,

Please help me out with this one.
I got a (set of ) Combobox(es), set to 'dropdown list'.

I add items to the list using 'additem'

DataBar_06.db06_combo(0).AddItem ("TestVehicle 1")
DataBar_06.db06_combo(0).AddItem ("TestVehicle 2")
etc.

When the program goes into runtime, it works as it should but initially the
combobox is blank.
I want to show the first item of the list in startup.

I tried changing the 'text' property, but it doesn't work, it is read only.

Any help is appreciated,
gb
Rick Rothstein (MVP - VB) - 30 Sep 2006 17:17 GMT
> Please help me out with this one.
> I got a (set of ) Combobox(es), set to 'dropdown list'.
[quoted text clipped - 12 lines]
> I tried changing the 'text' property, but it doesn't work, it is read
> only.

Try using this statement after the ComboBox has been populated...

DataBar_06.db06_combo(0).ListIndex = 0

Rick
gb - 30 Sep 2006 17:30 GMT
> Try using this statement after the ComboBox has been populated...
>
> DataBar_06.db06_combo(0).ListIndex = 0

okay, thanks Rick, it works.

regards,
gb
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.