From 8c2cd0a27d852f4b02ca07850a2fbaf9cec05368 Mon Sep 17 00:00:00 2001 From: graemeg Date: Sat, 8 Sep 2007 11:17:20 +0000 Subject: * GUI Designer: Some code formating changes in generated code. * GUI: minor amendments in basegrid and listbox to work correctly in the GUI Designer. --- examples/gui/gridtest/gridtest.lpr | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'examples/gui/gridtest') diff --git a/examples/gui/gridtest/gridtest.lpr b/examples/gui/gridtest/gridtest.lpr index a5f1d731..ca8bd071 100644 --- a/examples/gui/gridtest/gridtest.lpr +++ b/examples/gui/gridtest/gridtest.lpr @@ -24,7 +24,7 @@ type pagecontrol: TfpgPageControl; tsTab1: TfpgTabSheet; tsTab2: TfpgTabSheet; - grdMain: TfpgGrid; + grdMain: TfpgStringGrid; stringgrid: TfpgStringGrid; chkShowHeader: TfpgCheckBox; chkShowGrid: TfpgCheckBox; @@ -45,26 +45,26 @@ type procedure TMainForm.chkDisabledChange(Sender: TObject); begin - grdMain.Enabled := not chkDisabled.Checked; - stringgrid.Enabled := grdMain.Enabled; +// grdMain.Enabled := not chkDisabled.Checked; + stringgrid.Enabled := not chkDisabled.Checked; end; procedure TMainForm.chkRowSelectChange(Sender: TObject); begin - grdMain.RowSelect := chkRowSelect.Checked; - stringgrid.RowSelect := grdMain.RowSelect; +// grdMain.RowSelect := chkRowSelect.Checked; + stringgrid.RowSelect := chkRowSelect.Checked; end; procedure TMainForm.chkShowHeaderChange(Sender: TObject); begin - grdMain.ShowHeader := chkShowHeader.Checked; - stringgrid.ShowHeader := grdMain.ShowHeader; +// grdMain.ShowHeader := chkShowHeader.Checked; + stringgrid.ShowHeader := chkShowHeader.Checked; end; procedure TMainForm.chkShowGridChange(Sender: TObject); begin - grdMain.ShowGrid := chkShowGrid.Checked; - stringgrid.ShowGrid := grdMain.ShowGrid; +// grdMain.ShowGrid := chkShowGrid.Checked; + stringgrid.ShowGrid := chkShowGrid.Checked; end; procedure TMainForm.btnQuitClick(Sender: TObject); @@ -97,12 +97,12 @@ begin tsTab1 := TfpgTabSheet.Create(pagecontrol); tsTab1.Text := 'Base Grid'; - grdMain := TfpgGrid.Create(tsTab1); - grdMain.SetPosition(10, 10, Width-50, 250); +// grdMain := TfpgStringGrid.Create(tsTab1); +// grdMain.SetPosition(10, 10, Width-50, 250); // grdMain.Anchors := [anLeft, anTop, anRight, anBottom]; - grdMain.RowCount := 25; - for c := 1 to grdMain.ColumnCount do - grdMain.Columns[c-1].Title := 'Title ' + IntToStr(c); +// grdMain.RowCount := 25; +// for c := 1 to grdMain.ColumnCount do +// grdMain.Columns[c-1].Title := 'Title ' + IntToStr(c); tsTab2 := pagecontrol.AppendTabSheet('String Grid'); stringgrid := TfpgStringGrid.Create(tsTab2); -- cgit v1.2.3-70-g09d2