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