diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-08-11 13:31:33 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-08-11 13:31:33 +0000 |
commit | ebafc605dc3551b20ec7a8fd6f1d8f068222c86a (patch) | |
tree | 97e704536cbd5c52fac97044b4c77f0c00e55ff0 /examples/gui/gridtest | |
parent | 71eb8ce02629a33957b7f6c0733c1406b46678a0 (diff) | |
download | fpGUI-ebafc605dc3551b20ec7a8fd6f1d8f068222c86a.tar.xz |
* Renamed the unit gui_grid.pas to gui_basegrid.pas
* Implemented and added a TfpgCustomGrid.
* GridTest example has been updated to demo the TfpgCustomGrid.
Diffstat (limited to 'examples/gui/gridtest')
-rw-r--r-- | examples/gui/gridtest/gridtest.lpr | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/examples/gui/gridtest/gridtest.lpr b/examples/gui/gridtest/gridtest.lpr index 46ae250b..3f461155 100644 --- a/examples/gui/gridtest/gridtest.lpr +++ b/examples/gui/gridtest/gridtest.lpr @@ -7,9 +7,10 @@ uses cthreads, {$ENDIF}{$ENDIF} Classes, + SysUtils, fpgfx, gui_form, - gui_grid, + gui_customgrid, gui_button, gui_checkbox; @@ -19,7 +20,7 @@ type TMainForm = class(TfpgForm) private btnQuit: TfpgButton; - grdMain: TfpgBaseGrid; + grdMain: TfpgGrid; chkShowHeader: TfpgCheckBox; chkShowGrid: TfpgCheckBox; chkRowSelect: TfpgCheckBox; @@ -61,6 +62,8 @@ begin end; constructor TMainForm.Create(AOwner: TComponent); +var + c: integer; begin inherited Create(AOwner); WindowTitle := 'Grid control test'; @@ -71,12 +74,15 @@ begin btnQuit.ShowImage := True; btnQuit.Anchors := [anRight, anBottom]; - grdMain := TfpgBaseGrid.Create(self); + grdMain := TfpgGrid.Create(self); grdMain.Top := 10; grdMain.Left := 10; grdMain.Width := Width - 20; grdMain.Height := 300; grdMain.Anchors := [anLeft, anTop, anRight, anBottom]; + grdMain.RowCount := 25; + for c := 1 to grdMain.ColumnCount do + grdMain.Columns[c-1].Title := 'Title ' + IntToStr(c); chkShowHeader := CreateCheckBox(self, 10, 320, 'Show Header'); chkShowHeader.Checked := True; |