Opened 6 years ago

Last modified 6 years ago

#14742 infoneeded_new defect

wxSpinCtrl::SetValue(const wxString&) doesn't update m_oldValue (internal counter) in wxMSW

Reported by: staticinline Owned by:
Priority: normal Milestone:
Component: wxMSW Version: stable-latest
Keywords: Cc:
Blocked By: Blocking:
Patch: no


wxSpinCtrl::SetValue(const wxString&) doesn't (but should) update m_oldValue like wxSpinCtrl::SetValue(int val) does, under wxMSW.

The actual problem I observed was that SendSpinUpdate was sometimes not triggered from wxSpinCtrl::MSWOnScroll due to m_oldValue != new_value being incorrectly false following a call to wxSpinCtrl::SetValue(const wxString&). I changed my own code to use wxSpinCtrl::SetValue(int val), which fixes it for me and is better, but others may still run into the problem.

Change History (2)

comment:1 Changed 6 years ago by staticinline

Also, the problem previously didn't occur for me in 2.8.

comment:2 Changed 6 years ago by vadz

  • Milestone 2.9.5 deleted
  • Status changed from new to infoneeded_new

Could you please provide a minimal patch to a sample reproducing the problem? Or perhaps it can already be reproduced in the spin page of the widgets sample? If so, could you please clearly explain

  1. What do you do.
  2. What do you expect to happen.
  3. What actually happens.


Note: See TracTickets for help on using tickets.