Opened 8 years ago

Closed 8 years ago

#12221 closed defect (fixed)

wxGrid scrolling bug with non-standard vert. scroll increment

Reported by: mghie Owned by:
Priority: normal Milestone:
Component: wxGrid Version: stable-latest
Keywords: grid scroll regression Cc:
Blocked By: Blocking:
Patch: no


Tested with current wxWidgets trunk, it is a regression compared to the 2.8 branch where scrolling worked as intended even after changing the vertical scroll increment.

Steps to reproduce:

In the grid sample, add a line like


to the BigGridFrame constructor. The grid scrolling increment will be set correctly, but the scrolling code in the generic grid uses a different vertical scroll increment. Pressing Ctrl+End in the grid selects the correct cell, but the client area scrolling is wrong, and the scrollbar reflects this.

Change History (1)

comment:1 Changed 8 years ago by VZ

  • Resolution set to fixed
  • Status changed from new to closed

(In [64918]) Remove scroll units duplication in wxGrid to fix setting them.

For some unknown reason wxGrid decided to store its scroll units in its own
m_scrollLine[XY] variables instead of just using the base wxScrollWindow class
m_[xy]ScrollPixelsPerLine ones. And, of course, the two could get out of sync
because wxGrid didn't update the base class version correctly.

Just don't duplicate these values at all and use the base class fields. This
makes the code simpler and also fixes changing the size of the scroll units.

Closes #12221.

Note: See TracTickets for help on using tickets.