Full repaint of wxGrid' m_gridWin on scroll events?

Petr Smilauer petrsm at jcu.cz
Tue Jan 1 22:55:09 PST 2008


Hi,
 is there any way to persuade the wxGrid class not to "optimise" repaint
of the cell area by using the ::ScrollWindow API? This does not do the
right thing in my case, because cells might change background colour
depending on their position in visible part of the window (should have
different colour in the topmost row and leftmost column).

I know this kind of scrolling is done in wxScrollHelper class, so I 
tried
to proceed in the "official" way, calling EnableScrolling( false, false)
on my wxGrid-derived class, but doing so, the two subwindows for
headings are not properly updated after scroll event ...

What I do currently is to note in my wxGrid-derived class that a scroll
event proceeded and call m_gridWin->Refresh(false) in idle event 
handler.
Yet this means two non-consecutive repaints, and hence flickering...

I am using wxWin-2.8.3, if that matters

Many thanks

Petr Smilauer




More information about the wx-users mailing list