bool wxGridCellEditor::IsAcceptedKey(wxKeyEvent& event)
{
// accept the simple key presses, not anything with Ctrl/Alt/Meta
- return !(event.ControlDown() || event.AltDown());
+ return !(event.ControlDown() || event.AltDown() || event.GetKeyCode() == WXK_SHIFT);
}
void wxGridCellEditor::StartingKey(wxKeyEvent& event)
else
{
// ...or remove the attribute
- m_attrs[n].attr->DecRef();
+ // No need to DecRef the attribute itself since this is
+ // done be wxGridCellWithAttr's destructor!
m_attrs.RemoveAt(n);
n--; count--;
}
else
{
// ...or remove the attribute
- m_attrs[n].attr->DecRef();
+ // No need to DecRef the attribute itself since this is
+ // done be wxGridCellWithAttr's destructor!
m_attrs.RemoveAt(n);
n--; count--;
}
EndBatch();
}
+bool wxGrid::Enable(bool enable)
+{
+ if ( !wxScrolledWindow::Enable(enable) )
+ return false;
+
+ // redraw in the new state
+ m_gridWin->Refresh();
+
+ return true;
+}
//
// ------ Edit control functions
}
else
{
- rect = wxRect( 0, 0, 0, 0 );
+ rect = wxRect(0,0,0,0);
}
cellRect = CellToRect( bottomRight );
m_gridWin->GetClientSize( &cw, &ch );
if (right < 0 || bottom < 0 || left > cw || top > ch)
- return wxRect( 0, 0, 0, 0);
+ return wxRect(0,0,0,0);
rect.SetLeft( wxMax(0, left) );
rect.SetTop( wxMax(0, top) );