diff options
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; |