Changed wxGrid::OnPaint to call Refresh on subwindows.

Added Refresh to wxGrid::EndBatch().
Use batch mode in sample.
Changed CalcDimension to better handle cases with zero columns or rows.
No more automatic insertion of column when adding rows to a grid without
        columns.


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6947 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Neis
2000-03-26 12:36:59 +00:00
parent 48ed8556ac
commit 6989e08f3a
3 changed files with 25 additions and 7 deletions

View File

@@ -497,11 +497,13 @@ void GridFrame::DeleteSelectedRows( wxCommandEvent& WXUNUSED(ev) )
{
if ( grid->IsSelection() )
{
grid->BeginBatch();
for ( int n = 0; n < grid->GetNumberRows(); )
if ( grid->IsInSelection( n , 0 ) )
grid->DeleteRows( n, 1 );
else
n++;
grid->EndBatch();
}
}
@@ -510,11 +512,13 @@ void GridFrame::DeleteSelectedCols( wxCommandEvent& WXUNUSED(ev) )
{
if ( grid->IsSelection() )
{
grid->BeginBatch();
for ( int n = 0; n < grid->GetNumberCols(); )
if ( grid->IsInSelection( 0 , n ) )
grid->DeleteCols( n, 1 );
else
n++;
grid->EndBatch();
}
}