Default value for dropdown combo list box? 
Author Message
 Default value for dropdown combo list box?

My dropdown list boxes are all empty until my user clicks on the down arrow
and displays the dropdown list.

Is there a way to put a value in there so they don't have to click on every
box?

I tried writing the .value, but VB said 'that property is read only'!

I fill the list boxes with 'add.item'. I tried add.item 0 and that did not
work either.



Wed, 16 Apr 2003 03:21:03 GMT  
 Default value for dropdown combo list box?
After filling it, set the ListIndex property to 0 to
display the first entry.
...
George
GridLinx Software       Programming Tools for VB Programmers
http://www.gridlinx.com

Quote:

> My dropdown list boxes are all empty until my user clicks on the down arrow
> and displays the dropdown list.

> Is there a way to put a value in there so they don't have to click on every
> box?

> I tried writing the .value, but VB said 'that property is read only'!

> I fill the list boxes with 'add.item'. I tried add.item 0 and that did not
> work either.

--

Remove NOSPAM from address before replying.



Wed, 16 Apr 2003 13:09:08 GMT  
 Default value for dropdown combo list box?
You can also set the text porperty of a combo box

combo1.text = combo1(index).value

Or use a literal

combo1.text = "Joe"


Quote:
> After filling it, set the ListIndex property to 0 to
> display the first entry.
> ...
> George
> GridLinx Software Programming Tools for VB Programmers
> http://www.gridlinx.com


> > My dropdown list boxes are all empty until my user clicks on the down
arrow
> > and displays the dropdown list.

> > Is there a way to put a value in there so they don't have to click on
every
> > box?

> > I tried writing the .value, but VB said 'that property is read only'!

> > I fill the list boxes with 'add.item'. I tried add.item 0 and that did
not
> > work either.

> --

> Remove NOSPAM from address before replying.



Sat, 19 Apr 2003 06:41:58 GMT  
 Default value for dropdown combo list box?
set the index property after you have filled the box.  if you fill it at design
time, set the index then, otherwise right after you have populated it, choose
the default.
Quote:

> My dropdown list boxes are all empty until my user clicks on the down arrow
> and displays the dropdown list.

> Is there a way to put a value in there so they don't have to click on every
> box?

> I tried writing the .value, but VB said 'that property is read only'!

> I fill the list boxes with 'add.item'. I tried add.item 0 and that did not
> work either.



Tue, 08 Jul 2003 22:16:03 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Newbie: Set a combo box style(2)/Dropdown list to the first element in the list

2. Newbie: Set a combo box style(2)/Dropdown list to the first element in the list

3. Newbie: Set a combo box style(2)/Dropdown list to the first element in the list

4. How to set default value of combo box to value of record in database

5. Combo Box - no2 dropdown list problem

6. Combo Box dropdown list

7. Combo Box / Dropdown list

8. Combo Box Dropdown List Width

9. COMBO BOX, STYLE : DROPDOWN LIST

10. Locked Combo Box BUG (Dropdown List Style)

11. default value in combo box to last selected

12. Combo box default value - Help!

 

 
Powered by phpBB® Forum Software