Added ForceRefresh() to request immediate repainting of a grid.

Calling Refresh() doesn't do this because of our minimal OnPaint
handler (to reduce screen flicker).

Setting of position coords for wxGridEvents now takes account of
row and col label sizes.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@7798 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Michael Bedward 2000-07-21 06:51:22 +00:00
parent 47af912426
commit d82323930c
2 changed files with 24 additions and 2 deletions

View File

@ -1069,6 +1069,15 @@ public:
int GetBatchCount() { return m_batchCount; }
// Use this, rather than wxWindow::Refresh(), to force an
// immediate repainting of the grid. Has no effect if you are
// already inside a BeginBatch / EndBatch block.
//
// This function is necessary because wxGrid has a minimal OnPaint()
// handler to reduce screen flicker.
//
void ForceRefresh();
// ------ edit control functions
//

View File

@ -5240,7 +5240,8 @@ bool wxGrid::SendEvent( const wxEventType type,
type,
this,
rowOrCol,
mouseEv.GetX(), mouseEv.GetY(),
mouseEv.GetX() + GetColLabelSize(),
mouseEv.GetY() + GetRowLabelSize(),
mouseEv.ControlDown(),
mouseEv.ShiftDown(),
mouseEv.AltDown(),
@ -5270,7 +5271,8 @@ bool wxGrid::SendEvent( const wxEventType type,
type,
this,
row, col,
mouseEv.GetX(), mouseEv.GetY(),
mouseEv.GetX() + GetColLabelSize(),
mouseEv.GetY() + GetRowLabelSize(),
FALSE,
mouseEv.ControlDown(),
mouseEv.ShiftDown(),
@ -6150,6 +6152,17 @@ void wxGrid::EndBatch()
}
}
// Use this, rather than wxWindow::Refresh(), to force an immediate
// repainting of the grid. Has no effect if you are already inside a
// BeginBatch / EndBatch block.
//
void wxGrid::ForceRefresh()
{
BeginBatch();
EndBatch();
}
//
// ------ Edit control functions
//