From ebd773c6f8f20e0e7685e8f38806baab936337c4 Mon Sep 17 00:00:00 2001 From: Michael Bedward Date: Tue, 29 Feb 2000 01:37:37 +0000 Subject: [PATCH] Added wxWANTS_CHARS style to all windows so that the grid reacts to cursor keys when it is on a panel. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6342 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- include/wx/generic/grid.h | 11 ++++++----- src/generic/grid.cpp | 10 +++++----- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/include/wx/generic/grid.h b/include/wx/generic/grid.h index 32560636f6..55dfc660db 100644 --- a/include/wx/generic/grid.h +++ b/include/wx/generic/grid.h @@ -86,7 +86,7 @@ class WXDLLEXPORT wxSpinCtrl; // in the grid. You may pass it to the wxGridCellAttr (below) to change the // format of one given cell or to wxGrid::SetDefaultRenderer() to change the // view of all cells. This is an ABC, you will normally use one of the -// predefined derived classes or derive oyur own class from it. +// predefined derived classes or derive your own class from it. // ---------------------------------------------------------------------------- class WXDLLEXPORT wxGridCellRenderer @@ -197,7 +197,7 @@ protected: private: // formatting parameters int m_width, - m_precision; + m_precision; wxString m_format; }; @@ -862,7 +862,7 @@ public: wxWindowID id, const wxPoint& pos = wxDefaultPosition, const wxSize& size = wxDefaultSize, - long style = 0, + long style = wxWANTS_CHARS, const wxString& name = wxPanelNameStr ); ~wxGrid(); @@ -1250,9 +1250,10 @@ public: wxGrid( wxWindow *parent, int x, int y, int w = -1, int h = -1, - long style = 0, + long style = wxWANTS_CHARS, const wxString& name = wxPanelNameStr ) - : wxScrolledWindow( parent, -1, wxPoint(x,y), wxSize(w,h), style, name ) + : wxScrolledWindow( parent, -1, wxPoint(x,y), wxSize(w,h), + (style|wxWANTS_CHARS), name ) { Create(); } diff --git a/src/generic/grid.cpp b/src/generic/grid.cpp index a174ccf7a2..431115b10f 100644 --- a/src/generic/grid.cpp +++ b/src/generic/grid.cpp @@ -2512,7 +2512,7 @@ END_EVENT_TABLE() wxGridRowLabelWindow::wxGridRowLabelWindow( wxGrid *parent, wxWindowID id, const wxPoint &pos, const wxSize &size ) - : wxWindow( parent, id, pos, size ) + : wxWindow( parent, id, pos, size, wxWANTS_CHARS ) { m_owner = parent; } @@ -2565,7 +2565,7 @@ END_EVENT_TABLE() wxGridColLabelWindow::wxGridColLabelWindow( wxGrid *parent, wxWindowID id, const wxPoint &pos, const wxSize &size ) - : wxWindow( parent, id, pos, size ) + : wxWindow( parent, id, pos, size, wxWANTS_CHARS ) { m_owner = parent; } @@ -2618,7 +2618,7 @@ END_EVENT_TABLE() wxGridCornerLabelWindow::wxGridCornerLabelWindow( wxGrid *parent, wxWindowID id, const wxPoint &pos, const wxSize &size ) - : wxWindow( parent, id, pos, size ) + : wxWindow( parent, id, pos, size, wxWANTS_CHARS ) { m_owner = parent; } @@ -2672,7 +2672,7 @@ wxGridWindow::wxGridWindow( wxGrid *parent, wxGridRowLabelWindow *rowLblWin, wxGridColLabelWindow *colLblWin, wxWindowID id, const wxPoint &pos, const wxSize &size ) - : wxPanel( parent, id, pos, size, 0, "grid window" ) + : wxPanel( parent, id, pos, size, wxWANTS_CHARS, "grid window" ) { m_owner = parent; m_rowLabelWin = rowLblWin; @@ -2747,7 +2747,7 @@ wxGrid::wxGrid( wxWindow *parent, const wxSize& size, long style, const wxString& name ) - : wxScrolledWindow( parent, id, pos, size, style, name ), + : wxScrolledWindow( parent, id, pos, size, (style | wxWANTS_CHARS), name ), m_colMinWidths(wxKEY_INTEGER, GRID_HASH_SIZE) { Create();