From a204981d742be538473f484ef8187b7af3ee423e Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 22 Jun 2020 02:39:12 +0200 Subject: [PATCH] Add a test of wxSpinCtrl-based editor to the grid sample Just show an example of wxGridCellNumberEditor with range limits in action to make testing it simpler. --- samples/grid/griddemo.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/samples/grid/griddemo.cpp b/samples/grid/griddemo.cpp index 5e314e21b7..e03cbc9841 100644 --- a/samples/grid/griddemo.cpp +++ b/samples/grid/griddemo.cpp @@ -565,6 +565,8 @@ GridFrame::GridFrame() grid->SetCellValue(0, 9, "Integer\ncolumn"); grid->SetCellValue(1, 9, "17"); grid->SetCellValue(2, 9, "0"); + grid->SetCellEditor(2, 9, new wxGridCellNumberEditor(0, 100)); + grid->SetCellValue(2, 10, "<- This cell uses [0, 100] range"); grid->SetCellValue(3, 9, "-666"); grid->SetCellAlignment(3, 9, wxALIGN_CENTRE, wxALIGN_TOP); grid->SetCellValue(3, 10, "<- This numeric cell should be centred");