diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-08-11 11:09:59 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-08-11 11:09:59 +0000 |
commit | 71eb8ce02629a33957b7f6c0733c1406b46678a0 (patch) | |
tree | fe5b5e70cb43378d5b3ddfa85afafa8a2fb61053 /examples/gui | |
parent | 2ce2eccae88e86a3e29d527a4b42b9da2e4b4167 (diff) | |
download | fpGUI-71eb8ce02629a33957b7f6c0733c1406b46678a0.tar.xz |
* Grid changes
- Implemented keyboard navigation. Cell focus.
- Improved header painting and little square between scrollbars.
- Improved scrollbar behavior and slider sizing.
- Implemented mouse wheel support. Scrolling can also happen up/down
or left/right based on the visibility of the vertical scrollbar.
- Implemented cell selection via mouse
- Implemented column resize support.
- Extended the GridTest project to demo features
Diffstat (limited to 'examples/gui')
-rw-r--r-- | examples/gui/gridtest/gridtest.lpr | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/examples/gui/gridtest/gridtest.lpr b/examples/gui/gridtest/gridtest.lpr index 40c91bec..46ae250b 100644 --- a/examples/gui/gridtest/gridtest.lpr +++ b/examples/gui/gridtest/gridtest.lpr @@ -22,6 +22,10 @@ type grdMain: TfpgBaseGrid; chkShowHeader: TfpgCheckBox; chkShowGrid: TfpgCheckBox; + chkRowSelect: TfpgCheckBox; + chkDisabled: TfpgCheckBox; + procedure chkDisabledChange(Sender: TObject); + procedure chkRowSelectChange(Sender: TObject); procedure chkShowHeaderChange(Sender: TObject); procedure chkShowGridChange(Sender: TObject); procedure btnQuitClick(Sender: TObject); @@ -31,6 +35,16 @@ type { TMainForm } +procedure TMainForm.chkDisabledChange(Sender: TObject); +begin + grdMain.Enabled := not chkDisabled.Checked; +end; + +procedure TMainForm.chkRowSelectChange(Sender: TObject); +begin + grdMain.RowSelect := chkRowSelect.Checked; +end; + procedure TMainForm.chkShowHeaderChange(Sender: TObject); begin grdMain.ShowHeader := chkShowHeader.Checked; @@ -73,6 +87,16 @@ begin chkShowGrid.Checked := True; chkShowGrid.OnChange := @chkShowGridChange; chkShowGrid.Anchors := [anLeft, anBottom]; + + chkRowSelect := CreateCheckBox(self, chkShowGrid.Right+10, 320, 'Row Select'); + chkRowSelect.Checked := False; + chkRowSelect.OnChange := @chkRowSelectChange; + chkRowSelect.Anchors := [anLeft, anBottom]; + + chkDisabled := CreateCheckBox(self, chkRowSelect.Right+10, 320, 'Disabled'); + chkDisabled.Checked := False; + chkDisabled.OnChange := @chkDisabledChange; + chkDisabled.Anchors := [anLeft, anBottom]; end; |