From efead8c004c8ee46377155cca91f9d54fde0db0d Mon Sep 17 00:00:00 2001 From: and3md Date: Sat, 19 Aug 2017 15:49:37 +0200 Subject: [PATCH] Extend grid example - fullColumnOnLeft, fullRowOnTop checkboxes. --- examples/example1/src/example1.d | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/examples/example1/src/example1.d b/examples/example1/src/example1.d index b853b2f4..596c61a2 100644 --- a/examples/example1/src/example1.d +++ b/examples/example1/src/example1.d @@ -965,7 +965,15 @@ void main() //========================================================================== + VerticalLayout gridContent = new VerticalLayout("GRID_CONTENT"); + gridContent.layoutWidth(FILL_PARENT).layoutHeight(FILL_PARENT); + HorizontalLayout gridSettings = new HorizontalLayout(); StringGridWidget grid = new StringGridWidget("GRID1"); + + gridSettings.addChild((new CheckBox("fullColumnOnLeft", "fullColumnOnLeft"d)).checked(grid.fullColumnOnLeft).tooltipText("Extends scroll area to show full column at left when scrolled to rightmost column"d).addOnCheckChangeListener(delegate(Widget, bool checked) { grid.fullColumnOnLeft = checked; return true;})); + gridSettings.addChild((new CheckBox("fullRowOnTop", "fullRowOnTop"d)).checked(grid.fullRowOnTop).tooltipText("Extends scroll area to show full row at top when scrolled to end row"d).addOnCheckChangeListener(delegate(Widget, bool checked) { grid.fullRowOnTop = checked; return true;})); + gridContent.addChild(gridSettings); + grid.layoutWidth(FILL_PARENT).layoutHeight(FILL_PARENT); grid.showColHeaders = true; grid.showRowHeaders = true; @@ -993,7 +1001,8 @@ void main() grid.setColTitle(x, res); } grid.autoFit(); - tabs.addTab(grid, "Grid"d); + gridContent.addChild(grid); + tabs.addTab(gridContent, "Grid"d); //========================================================================== // Scroll view example