Bug in wx.ControlWithItems ?

Hi everyone,

something I noticed since 2.6. Selecting a ComboBox with the mouse will
produce an even that is one selection behind.
Using the demo code it's easy to reproduce: Just add a log.write to the
evt_combobox that prints the value of cb.GetSelection()

when the combobox is changed using the mouse the result of GetSelection() will
be one event behind. I.e. you click on "five" and then on "three".
When you click on "three" the evt.GetString() will correctly produce "three",
but the cb.GetSelection() will produce 5.
If you use the cursor keys the GetSelection() will return the correct value.

Can anyone reproduce that?

This is 2.6.2.1 on Linux Gtk2 ansi

  UC

···

--
Open Source Solutions 4U, LLC 1618 Kelly St
Phone: +1 707 568 3056 Santa Rosa, CA 95401
Cell: +1 650 302 2405 United States
Fax: +1 707 568 6416

Update on this.
The problem is not reproducable on win 2000 with 2.6.2.1
So I guess this has to be a problem with the GTK2 version.

···

On Sunday 19 February 2006 10:37, Uwe C. Schroeder wrote:

Hi everyone,

something I noticed since 2.6. Selecting a ComboBox with the mouse will
produce an even that is one selection behind.
Using the demo code it's easy to reproduce: Just add a log.write to the
evt_combobox that prints the value of cb.GetSelection()

when the combobox is changed using the mouse the result of GetSelection()
will be one event behind. I.e. you click on "five" and then on "three".
When you click on "three" the evt.GetString() will correctly produce
"three", but the cb.GetSelection() will produce 5.
If you use the cursor keys the GetSelection() will return the correct
value.

Can anyone reproduce that?

This is 2.6.2.1 on Linux Gtk2 ansi

  UC

--
Open Source Solutions 4U, LLC 1618 Kelly St
Phone: +1 707 568 3056 Santa Rosa, CA 95401
Cell: +1 650 302 2405 United States
Fax: +1 707 568 6416

---------------------------------------------------------------------
To unsubscribe, e-mail: wxPython-users-unsubscribe@lists.wxwidgets.org
For additional commands, e-mail: wxPython-users-help@lists.wxwidgets.org

--
  UC

--
Open Source Solutions 4U, LLC 1618 Kelly St
Phone: +1 707 568 3056 Santa Rosa, CA 95401
Cell: +1 650 302 2405 United States
Fax: +1 707 568 6416

Uwe C. Schroeder wrote:

Hi everyone,

something I noticed since 2.6. Selecting a ComboBox with the mouse will produce an even that is one selection behind.
Using the demo code it's easy to reproduce: Just add a log.write to the evt_combobox that prints the value of cb.GetSelection()

when the combobox is changed using the mouse the result of GetSelection() will be one event behind. I.e. you click on "five" and then on "three".
When you click on "three" the evt.GetString() will correctly produce "three", but the cb.GetSelection() will produce 5.
If you use the cursor keys the GetSelection() will return the correct value.

Can anyone reproduce that?

It's been fixed in 2.7, but I don't know if it can be back ported to 2.6 or not.

···

--
Robin Dunn
Software Craftsman
http://wxPython.org Java give you jitters? Relax with wxPython!