From: sid on
Using the following code snip in VB.net, When I start the app and
pulldown the list from the combox box it tries to make a selection.
But I don't want this feature. How do I prevent it.
Why is the first item of the list selected as soon as the pulldown
drops ?


Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles MyBase.Load

Dim i As Integer

For i = 0 To 5
Me.ComboBox1.Items.Add(Chr(65 + i) & "- " & Format(i,
"00"))
Next
Me.ComboBox1.Text = "A"

End Sub
From: Mr. Arnold on
sid wrote:
> Using the following code snip in VB.net, When I start the app and
> pulldown the list from the combox box it tries to make a selection.
> But I don't want this feature. How do I prevent it.
> Why is the first item of the list selected as soon as the pulldown
> drops ?
>
>
> Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
>
> Dim i As Integer
>
> For i = 0 To 5
> Me.ComboBox1.Items.Add(Chr(65 + i) & "- " & Format(i,
> "00"))
> Next
> Me.ComboBox1.Text = "A"

Me.ComboBox1.SelectedIndex = -1 -- to deselect combobox you
may have to execute the deselect statement twice.
>
> End Sub
From: sid on
On Jun 15, 4:37 pm, "Mr. Arnold" <Arn...(a)Arnold.com> wrote:
> sid wrote:
> > Using the following code snip in VB.net, When I start the app and
> > pulldown the list from the combox box it tries to make a selection.
> > But I don't want this feature. How do I prevent it.
> > Why is the first item of the list selected as soon as the pulldown
> > drops ?
>
> > Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
> > System.EventArgs) Handles MyBase.Load
>
> >         Dim i As Integer
>
> >         For i = 0 To 5
> >             Me.ComboBox1.Items.Add(Chr(65 + i) & "- " & Format(i,
> > "00"))
> >         Next
> >         Me.ComboBox1.Text = "A"
>
>            Me.ComboBox1.SelectedIndex = -1   -- to deselect combobox you
> may have to execute the deselect statement twice.
>
>
>
>
>
> > End Sub- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -
>
> - Show quoted text -

I have already tried this without any success.
The autoselection is made when the list is opened, then the text field
is populated with whatever selection is the closest match.

I want to give the user the option to browse the selections with out
actually choosing one, and then they can choose or manually type an
entry in the text field.

From: Cor Ligthert[MVP] on
It seems that you have set at design time the autocomplete property.


"sid" <sidwelle(a)alexian.net> wrote in message
news:0c2d4abf-5f2c-4bc9-ab84-eccf8bd81b2a(a)c10g2000yqi.googlegroups.com...
> Using the following code snip in VB.net, When I start the app and
> pulldown the list from the combox box it tries to make a selection.
> But I don't want this feature. How do I prevent it.
> Why is the first item of the list selected as soon as the pulldown
> drops ?
>
>
> Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
> System.EventArgs) Handles MyBase.Load
>
> Dim i As Integer
>
> For i = 0 To 5
> Me.ComboBox1.Items.Add(Chr(65 + i) & "- " & Format(i,
> "00"))
> Next
> Me.ComboBox1.Text = "A"
>
> End Sub

From: sid on
On Jun 16, 1:52 am, "Cor Ligthert[MVP]" <Notmyfirstn...(a)planet.nl>
wrote:
> It seems that you have set at design time the autocomplete property.
>
> "sid" <sidwe...(a)alexian.net> wrote in message
>
> news:0c2d4abf-5f2c-4bc9-ab84-eccf8bd81b2a(a)c10g2000yqi.googlegroups.com...
>
>
>
> > Using the following code snip in VB.net, When I start the app and
> > pulldown the list from the combox box it tries to make a selection.
> > But I don't want this feature. How do I prevent it.
> > Why is the first item of the list selected as soon as the pulldown
> > drops ?
>
> > Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As
> > System.EventArgs) Handles MyBase.Load
>
> >        Dim i As Integer
>
> >        For i = 0 To 5
> >            Me.ComboBox1.Items.Add(Chr(65 + i) & "- " & Format(i,
> > "00"))
> >        Next
> >        Me.ComboBox1.Text = "A"
>
> > End Sub- Hide quoted text -
>
> - Show quoted text -

No, I set this property to none at desing time and in the code after
the app started.

Private Sub form1_Load(ByVal sender ...
combobox1.AutocompleteMode = AutoCompleteMode.None