Speaking of Combobox Change Events... 
Author Message
 Speaking of Combobox Change Events...

Hi,
    When a standard VB6 combobox is set to "Dropdown List" style, it
does not fire a Change event when the user chooses a new item. Is this
the correct method of operation for this control? Is there any way to
know when the user has made a change without the control losing focus?
Any work-arounds?

Thanks!

--
Later...

**** Mark Aydelotte
**** Vector Lord
**** silent ) planet

**** http://www.*-*-*.com/



Mon, 10 Dec 2001 03:00:00 GMT  
 Speaking of Combobox Change Events...

Quote:

>    When a standard VB6 combobox is set to "Dropdown List" style, it
>does not fire a Change event when the user chooses a new item. Is this
>the correct method of operation for this control? Is there any way to
>know when the user has made a change without the control losing focus?
>Any work-arounds?

The Change event is used for the text box portion of the combo box (a
combination of a text box and a list box). When the combo is in Dropdown
list mode, the text box portion is not used. Therefore, you have to use the
click event to monitor changes in the selected item in the list.

Frank Carr



Mon, 10 Dec 2001 03:00:00 GMT  
 Speaking of Combobox Change Events...

Quote:
> Hi,
>     When a standard VB6 combobox is set to "Dropdown List" style, it
> does not fire a Change event when the user chooses a new item. Is this
> the correct method of operation for this control? Is there any way to
> know when the user has made a change without the control losing focus?
> Any work-arounds?

This is the behaviour we've got used to for years.  "Change" happens in true
combo style, where the control is a textbox with an added list to select
from if you like. It doesn't happen in dropdown list style, where the
"textbox" is essentially locked and gets modified as a side-effect of
selecting a new item in the list.  It sort of makes sense if you look at it
like that.

The solution is easy -- the Click event can always be used for code which
checks whether the selected item has changed.

Bertie



Mon, 10 Dec 2001 03:00:00 GMT  
 Speaking of Combobox Change Events...
Ok, but why isn't a change event generated by the .clear method of a
combobox with a style set to "dropdown combo"?


Quote:


> > Hi,
> >     When a standard VB6 combobox is set to "Dropdown List" style, it
> > does not fire a Change event when the user chooses a new item. Is this
> > the correct method of operation for this control? Is there any way to
> > know when the user has made a change without the control losing focus?
> > Any work-arounds?

> This is the behaviour we've got used to for years.  "Change" happens in
true
> combo style, where the control is a textbox with an added list to select
> from if you like. It doesn't happen in dropdown list style, where the
> "textbox" is essentially locked and gets modified as a side-effect of
> selecting a new item in the list.  It sort of makes sense if you look at
it
> like that.

> The solution is easy -- the Click event can always be used for code which
> checks whether the selected item has changed.

> Bertie



Mon, 10 Dec 2001 03:00:00 GMT  
 Speaking of Combobox Change Events...
You got me there, Gordy baby!

Bertie


Quote:
> Ok, but why isn't a change event generated by the .clear method of a
> combobox with a style set to "dropdown combo"?





> > > Hi,
> > >     When a standard VB6 combobox is set to "Dropdown List" style, it
> > > does not fire a Change event when the user chooses a new item. Is this
> > > the correct method of operation for this control? Is there any way to
> > > know when the user has made a change without the control losing focus?
> > > Any work-arounds?

> > This is the behaviour we've got used to for years.  "Change" happens in
> true
> > combo style, where the control is a textbox with an added list to select
> > from if you like. It doesn't happen in dropdown list style, where the
> > "textbox" is essentially locked and gets modified as a side-effect of
> > selecting a new item in the list.  It sort of makes sense if you look at
> it
> > like that.

> > The solution is easy -- the Click event can always be used for code
which
> > checks whether the selected item has changed.

> > Bertie



Mon, 10 Dec 2001 03:00:00 GMT  
 Speaking of Combobox Change Events...
Thanks to all that responded. I figured out that I should use the click event
and watch for changes. What a hose!

--
Later...

**** Mark Aydelotte
**** Vector Lord
**** silent ) planet

**** http://www.silentplanet.com

Quote:

> You got me there, Gordy baby!

> Bertie



> > Ok, but why isn't a change event generated by the .clear method of a
> > combobox with a style set to "dropdown combo"?





> > > > Hi,
> > > >     When a standard VB6 combobox is set to "Dropdown List" style, it
> > > > does not fire a Change event when the user chooses a new item. Is this
> > > > the correct method of operation for this control? Is there any way to
> > > > know when the user has made a change without the control losing focus?
> > > > Any work-arounds?

> > > This is the behaviour we've got used to for years.  "Change" happens in
> > true
> > > combo style, where the control is a textbox with an added list to select
> > > from if you like. It doesn't happen in dropdown list style, where the
> > > "textbox" is essentially locked and gets modified as a side-effect of
> > > selecting a new item in the list.  It sort of makes sense if you look at
> > it
> > > like that.

> > > The solution is easy -- the Click event can always be used for code
> which
> > > checks whether the selected item has changed.

> > > Bertie



Mon, 10 Dec 2001 03:00:00 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. ComboBox Change Event Does not fire when user changes selection

2. How I stop the Speech's Speak method before it finish speaking

3. commandbar combobox and its change event

4. commandbar combobox and its change event

5. Help: Losing ComboBox Change event in UserControl OCX

6. Combobox control, change event

7. Change event (combobox)

8. ComboBox Change Event

9. ComboBox Change event

10. ComboBox Change event

11. Combobox List Change Event

12. combobox style2 change event

 

 
Powered by phpBB® Forum Software