diff options
author | Graeme Geldenhuys <graemeg@gmail.com> | 2013-07-25 12:12:14 +0100 |
---|---|---|
committer | Graeme Geldenhuys <graemeg@gmail.com> | 2013-07-25 12:12:14 +0100 |
commit | da2e177dc983e9c5c35ea940eda0bc68507bd2e5 (patch) | |
tree | e902fb0eff1c6393680282e497a762b2c22a36d3 /examples/gui | |
parent | c0e97a8f456af182bd16d563e8e712c12ade2e06 (diff) | |
download | fpGUI-da2e177dc983e9c5c35ea940eda0bc68507bd2e5.tar.xz |
tabtest: Adds a debug label to tabsheet four to verify the tabsheet height value
Diffstat (limited to 'examples/gui')
-rw-r--r-- | examples/gui/tabtest/tabtest.lpr | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/examples/gui/tabtest/tabtest.lpr b/examples/gui/tabtest/tabtest.lpr index ff069e7c..3675e29a 100644 --- a/examples/gui/tabtest/tabtest.lpr +++ b/examples/gui/tabtest/tabtest.lpr @@ -6,7 +6,7 @@ uses {$IFDEF UNIX}{$IFDEF UseCThreads} cthreads, {$ENDIF}{$ENDIF} - Classes, + Classes, SysUtils, fpg_main, fpg_base, fpg_widget, fpg_form, fpg_tab, fpg_button, fpg_label, fpg_edit, fpg_checkbox, fpg_combobox; @@ -23,6 +23,8 @@ type chkSort: TfpgCheckBox; cbTabPos: TfpgComboBox; edtHeight: TfpgEditInteger; + lbl: TfpgLabel; + procedure TabSheet4Painting(Sender: TObject); procedure edtHeightChanged(Sender: TObject); procedure btnQuitClick(Sender: TObject); procedure btn2Click(Sender: TObject); @@ -35,6 +37,11 @@ type { TMainForm } +procedure TMainForm.TabSheet4Painting(Sender: TObject); +begin + lbl.Text := 'H: ' + IntToStr(tsFour.Height); +end; + procedure TMainForm.edtHeightChanged(Sender: TObject); begin pcMain.FixedTabHeight := edtHeight.Value; @@ -123,7 +130,9 @@ begin tsFour := TfpgTabSheet.Create(pcMain); tsFour.Text := 'This is one long text caption'; tsFour.BackgroundColor := clMediumSeaGreen; - + tsFour.OnPaint := @TabSheet4Painting; + lbl := CreateLabel(tsFour, 30, 50, 'TabSheet Four'); + pcMain.ActivePage := tsOne; btn2 := CreateButton(self, 10, 320, 80, 'Page 1', @btn2Click); |