Home All Groups Group Topic Archive Search About
Author
28 May 2006 3:00 PM
Peter Morris
Hi, I'm using VB 2005 express for the first time.  I have used
other VB's before ie Excel,  Access and VB6, but 2005 is
different to what I've used.


What properties do I set on a combobox to turn off the editable
box and restrict to the list of values?

How do I set the initial value displayed?

Author
28 May 2006 3:58 PM
Terry
Don't use the 'express' edition, but in the regular edition, you would set
the controls 'DropDownStyle' to 'DropDownList' and you can use either the
'SelectedItem' or 'SelectedIndex' (zero based).   You can set the style at
design  time.  In the forms load event you would select the initial item:
ComboBox1.SelectedIndex = 3 for example.
--
Terry


Show quoteHide quote
"Peter Morris" wrote:

> Hi, I'm using VB 2005 express for the first time.  I have used
> other VB's before ie Excel,  Access and VB6, but 2005 is
> different to what I've used.
>
>
> What properties do I set on a combobox to turn off the editable
> box and restrict to the list of values?
>
> How do I set the initial value displayed?
>
>
>