Allow disabling hiding columns when using wxHeaderCtrl in wxGrid

Add wxGrid::DisableHidingColumns() method which can be used to prevent
wxHeaderCtrl from allowing the user to hide columns interactively, which
is something it allows to do by default, unlike the "built-in" wxGrid
header.

Also add EnableHidingColumns() and CanHideColumns() for consistency with
the other similar methods.

Closes https://github.com/wxWidgets/wxWidgets/pull/1554
This commit is contained in:
Ilya Sinitsyn
2019-09-16 23:14:25 +07:00
committed by Vadim Zeitlin
parent 4302c6b8ba
commit e26d90028b
6 changed files with 72 additions and 1 deletions

View File

@@ -147,7 +147,7 @@ public:
wxID_ANY,
wxDefaultPosition,
wxDefaultSize,
wxHD_ALLOW_HIDE |
(owner->CanHideColumns() ? wxHD_ALLOW_HIDE : 0) |
(owner->CanDragColMove() ? wxHD_ALLOW_REORDER : 0))
{
}