case WXK_DOWN:
case WXK_LEFT:
case WXK_RIGHT:
+ case WXK_PRIOR:
+ case WXK_NEXT:
case WXK_RETURN:
if ( m_isCellControl )
{
wxGRID_CELLCTRL,
"",
wxPoint(1,1),
- wxSize(1,1),
- wxNO_BORDER
+ wxSize(1,1)
#ifdef __WXMSW__
- | wxTE_MULTILINE | wxTE_NO_VSCROLL
+ , wxTE_MULTILINE | wxTE_NO_VSCROLL
#endif
);
y = m_rowBottoms[row] - m_rowHeights[row];
if ( y >= ch ) return;
- dc.SetLogicalFunction( wxXOR );
+ dc.SetLogicalFunction( wxINVERT );
dc.SetPen( wxPen(GetCellHighlightColour(), 2, wxSOLID) );
dc.SetBrush( *wxTRANSPARENT_BRUSH );
- dc.DrawRectangle( x, y,
- m_colWidths[col] + 2,
- m_rowHeights[row] + 2 );
+ dc.DrawRectangle( x-2, y-2,
+ m_colWidths[col] + 6,
+ m_rowHeights[row] + 6 );
dc.SetLogicalFunction( wxCOPY );
}
//
void wxGrid::HideCurrentCellHighlight( wxDC& dc )
{
- if ( m_currentCellHighlighted &&
+ if ( !m_cellEditCtrlEnabled &&
+ m_currentCellHighlighted &&
m_currentCellCoords != wxGridNoCellCoords )
{
DrawCellHighlight( dc, m_currentCellCoords );
//
void wxGrid::ShowCurrentCellHighlight( wxDC& dc )
{
- if ( !m_currentCellHighlighted &&
+ if ( !m_cellEditCtrlEnabled &&
+ !m_currentCellHighlighted &&
m_currentCellCoords != wxGridNoCellCoords )
{
DrawCellHighlight( dc, m_currentCellCoords );
if ( m_cellEditCtrl &&
enable != m_cellEditCtrlEnabled )
{
+ wxClientDC dc( this );
+
+ HideCurrentCellHighlight( dc );
HideCellEditControl();
SaveEditControlValue();
SetEditControlValue();
ShowCellEditControl();
+ ShowCurrentCellHighlight( dc );
}
}