wx.ComboBox selection problem with mutliple entries of same name

Hi everyone,

I am facing a problem with trying to figure out how to get Wx.Combobox to
select the proper entry when I append multiple strings with the same name.

Example.

combobox.Append('a string')
combobox.Append('a string')
combobox.SetSelection(1)
now when I click on combobox to see which row is highlighted, it turns out
row 0 is highlighted. Can someone help me figure out how I can get the
second row highlighted instead?

Jimmy

···

--
View this message in context: http://wxpython-users.1045709.n5.nabble.com/wx-ComboBox-selection-problem-with-mutliple-entries-of-same-name-tp4581319p4581319.html
Sent from the wxPython-users mailing list archive at Nabble.com.

Please let us know the platform, version and provide a runnable sample. MakingSampleApps - wxPyWiki

···

On 7/12/11 7:41 PM, Cyzward wrote:

Hi everyone,

I am facing a problem with trying to figure out how to get Wx.Combobox to
select the proper entry when I append multiple strings with the same name.

Example.

combobox.Append('a string')
combobox.SetSelection(1)
now when I click on combobox to see which row is highlighted, it turns out
row 0 is highlighted. Can someone help me figure out how I can get the
second row highlighted instead?

--
Robin Dunn
Software Craftsman

Hi,

I ended up deciding not to append strings with the same name to avoid
this problem altogether. I am using wxpython 2.8 on Linux Mint.

Thanks for your help,
Jimmy

···

On Jul 14, 4:34 pm, Robin Dunn <ro...@alldunn.com> wrote:

On 7/12/11 7:41 PM, Cyzward wrote:

> Hi everyone,

> I am facing a problem with trying to figure out how to get Wx.Combobox to
> select the proper entry when I append multiple strings with the same name.

> Example.

> combobox.Append('a string')
> combobox.Append('a string')
> combobox.SetSelection(1)
> now when I click on combobox to see which row is highlighted, it turns out
> row 0 is highlighted. Can someone help me figure out how I can get the
> second row highlighted instead?

Please let us know the platform, version and provide a runnable sample.
MakingSampleApps - wxPyWiki

--
Robin Dunn
Software Craftsmanhttp://wxPython.org