#if wxUSE_UNICODE
ch = event.GetUnicodeKey();
if (ch <= 127)
- ch = event.GetKeyCode();
+ ch = (wxChar)event.GetKeyCode();
#else
- ch = event.GetKeyCode();
+ ch = (wxChar)event.GetKeyCode();
#endif
switch (ch)
{
tmpbuf[0] = (char) keycode;
tmpbuf[1] = '\0';
wxString strbuf(tmpbuf, *wxConvCurrent);
+#if wxUSE_INTL
bool is_decimal_point = ( strbuf ==
wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT, wxLOCALE_CAT_NUMBER) );
+#else
+ bool is_decimal_point = ( strbuf == _T(".") );
+#endif
if ( wxIsdigit(keycode) || keycode == '+' || keycode == '-'
|| is_decimal_point )
{
tmpbuf[0] = (char) keycode;
tmpbuf[1] = '\0';
wxString strbuf(tmpbuf, *wxConvCurrent);
+#if wxUSE_INTL
bool is_decimal_point =
( strbuf == wxLocale::GetInfo(wxLOCALE_DECIMAL_POINT,
wxLOCALE_CAT_NUMBER) );
+#else
+ bool is_decimal_point = ( strbuf == _T(".") );
+#endif
if ( (keycode < 128) &&
(wxIsdigit(keycode) || tolower(keycode) == 'e' ||
is_decimal_point || keycode == '+' || keycode == '-') )
y = wxMax( h - 1, 0 );
// do set scrollbar parameters
- SetScrollbars( GRID_SCROLL_LINE_X, GRID_SCROLL_LINE_Y,
+ SetScrollbars( m_scrollLineX, m_scrollLineY,
GetScrollX(w), GetScrollY(h), x, y,
GetBatchCount() != 0);
// visible (even after calling MakeCellVisible the
// control is not created and calling StartingKey will
// crash the app
- if ( editor->IsCreated() && m_cellEditCtrlEnabled )
+ if ( event.GetKeyCode() != WXK_F2 && editor->IsCreated() && m_cellEditCtrlEnabled )
editor->StartingKey(event);
}
else
//
// Sometimes GRID_SCROLL_LINE/2 is not enough, so just add a full
// scroll unit...
- ypos += GRID_SCROLL_LINE_Y;
+ ypos += m_scrollLineY;
}
if ( left < 0 )
xpos = x0 + (right - cw);
// see comment for ypos above
- xpos += GRID_SCROLL_LINE_X;
+ xpos += m_scrollLineX;
}
if ( xpos != -1 || ypos != -1 )
{
if ( xpos != -1 )
- xpos /= GRID_SCROLL_LINE_X;
+ xpos /= m_scrollLineX;
if ( ypos != -1 )
- ypos /= GRID_SCROLL_LINE_Y;
+ ypos /= m_scrollLineY;
Scroll( xpos, ypos );
AdjustScrollbars();
}
// won't get the scrollbars if we're sized exactly to this width
// CalcDimension adds m_extraWidth + 1 etc. to calculate the necessary
// scrollbar steps
- wxSize sizeFit(GetScrollX(size.x + m_extraWidth + 1) * GRID_SCROLL_LINE_X,
- GetScrollY(size.y + m_extraHeight + 1) * GRID_SCROLL_LINE_Y);
+ wxSize sizeFit(GetScrollX(size.x + m_extraWidth + 1) * m_scrollLineX,
+ GetScrollY(size.y + m_extraHeight + 1) * m_scrollLineY);
// distribute the extra space between the columns/rows to avoid having
// extra white space