Add support for freezing columns and/or rows of wxGrid
Add wxGrid::FreezeTo() method which allows to freeze the given number of columns and/or rows at the beginning of the grid, i.e. keep them pinned in place while the rest of the grid is scrolled. The main wxGridWindow (m_gridWin) now corresponds to the non-frozen part of the grid, with up to 3 new similar windows for the frozen rows/columns and the frozen corner cells (which only exist if both rows and columns are frozen) being additionally used. Doing this involved adding "wxGridWindow*" parameter to many functions that previously only worked with m_gridWin itself and addressing additional complications, such as mouse events that can now cross different windows. See https://github.com/wxWidgets/wxWidgets/pull/952 for the original version of the changes.
This commit is contained in:
committed by
Vadim Zeitlin
parent
f61b58bba3
commit
04f7f1fd32
@@ -75,6 +75,8 @@ class GridFrame : public wxFrame
|
||||
void SelectCols( wxCommandEvent& );
|
||||
void SelectRowsOrCols( wxCommandEvent& );
|
||||
|
||||
void FreezeOrThaw( wxCommandEvent& );
|
||||
|
||||
void DeselectCell(wxCommandEvent& event);
|
||||
void DeselectCol(wxCommandEvent& event);
|
||||
void DeselectRow(wxCommandEvent& event);
|
||||
@@ -204,6 +206,8 @@ public:
|
||||
ID_SIZE_LABELS_ROW,
|
||||
ID_SIZE_GRID,
|
||||
|
||||
ID_FREEZE_OR_THAW,
|
||||
|
||||
ID_SET_HIGHLIGHT_WIDTH,
|
||||
ID_SET_RO_HIGHLIGHT_WIDTH,
|
||||
|
||||
|
Reference in New Issue
Block a user