diff options
Diffstat (limited to 'examples/gui/gridtest/gridtest.lpr')
-rw-r--r-- | examples/gui/gridtest/gridtest.lpr | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/examples/gui/gridtest/gridtest.lpr b/examples/gui/gridtest/gridtest.lpr index f2c0b017..4c2c0e16 100644 --- a/examples/gui/gridtest/gridtest.lpr +++ b/examples/gui/gridtest/gridtest.lpr @@ -16,7 +16,8 @@ uses fpg_button, fpg_checkbox, fpg_tab, - fpg_edit; + fpg_edit, + fpg_dialogs; type @@ -42,6 +43,7 @@ type chkSmoothScroll: TfpgCheckBox; chkAlterColor: TfpgCheckBox; {@VFD_HEAD_END: MainForm} + procedure StringGridHeaderClicked(Sender: TObject; ACol: Integer); procedure StringGridDoubleClicked(Sender: TObject; AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint); procedure btnAddFiveClicked(Sender: TObject); procedure btnAddOneClicked(Sender: TObject); @@ -66,6 +68,11 @@ type { TMainForm } +procedure TMainForm.StringGridHeaderClicked(Sender: TObject; ACol: Integer); +begin + ShowMessage(Format('column %d clicked', [ACol])); +end; + procedure TMainForm.StringGridDoubleClicked(Sender: TObject; AButton: TMouseButton; AShift: TShiftState; const AMousePos: TPoint); var @@ -245,6 +252,7 @@ begin // Add custom painting OnDrawCell := @StringGridDrawCell; OnDoubleClick := @StringGridDoubleClicked; + OnHeaderClick := @StringGridHeaderClicked; end; chkShowHeader := TfpgCheckBox.Create(self); |