Added support for grids with m_numRows=0. SelectRow(i,TRUE) now sets

ControlDown to TRUE in the generated event.
Fixed stupid bug in row/column deletion in griddemo.cpp


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_2_BRANCH@6930 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Stefan Neis
2000-03-25 14:02:54 +00:00
parent afc91dbf75
commit 857a175053
2 changed files with 186 additions and 113 deletions

View File

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