bind method to a combobox?

Hi there. Let’s say I have a list of all cities in the US in a ComboBox but since it would be a very long list I create another ComboBox of US States to filter the one below (cities ComboBox). How can I make the cities list reload once a value in the states ComboBox is selected? Is there a way to manage this without creating a load button?

Thanks a lot.

Hi,

Hi there. Let's say I have a list of all cities in the US in a ComboBox but
since it would be a very long list I create another ComboBox of US States to
filter the one below (cities ComboBox). How can I make the cities list
reload once a value in the states ComboBox is selected? Is there a way to
manage this without creating a load button?

I presume you have those 2 combo boxes in a panel?
So, when you create a combo box1 for the states, you bind to the selection
change event with the function in the same panel.
In that function you acquire the second combo box variable and push the
appropriate data in it.

But you may also filter it further down by county with the same logic.
Because for some states the number of cities will still be big.

Thank you.

···

On Mon, May 23, 2016 at 3:16 PM, maurice <mauricioliveiraguarda@gmail.com> wrote:

Thanks a lot.

--
You received this message because you are subscribed to the Google Groups
"wxPython-users" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to wxpython-users+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Thanks a lot, I figured out here as well wxPython - ComboBox & Choice Class

···

On Monday, May 23, 2016 at 5:02:41 PM UTC-3, Igor Korot wrote:

Hi,

On Mon, May 23, 2016 at 3:16 PM, maurice > > mauricioli...@gmail.com wrote:

Hi there. Let’s say I have a list of all cities in the US in a ComboBox but

since it would be a very long list I create another ComboBox of US States to

filter the one below (cities ComboBox). How can I make the cities list

reload once a value in the states ComboBox is selected? Is there a way to

manage this without creating a load button?

I presume you have those 2 combo boxes in a panel?

So, when you create a combo box1 for the states, you bind to the selection

change event with the function in the same panel.

In that function you acquire the second combo box variable and push the

appropriate data in it.

But you may also filter it further down by county with the same logic.

Because for some states the number of cities will still be big.

Thank you.

Thanks a lot.

You received this message because you are subscribed to the Google Groups

“wxPython-users” group.

To unsubscribe from this group and stop receiving emails from it, send an

email to wxpython-user...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.