diff options
author | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-07-02 13:08:53 +0200 |
---|---|---|
committer | Graeme Geldenhuys <graeme@mastermaths.co.za> | 2010-07-02 13:08:53 +0200 |
commit | 9e2c3a23b3cb347f4f46383d080926706e5f3abb (patch) | |
tree | fcb0e63a5d602d72f9c6c5f08e1b00989f317a29 /examples | |
parent | 6372ff01264c3c158645dd732556ecfa481de4ad (diff) | |
download | fpGUI-9e2c3a23b3cb347f4f46383d080926706e5f3abb.tar.xz |
Bevel Example: added an extra option to change BorderStyle at runtime.
Diffstat (limited to 'examples')
-rw-r--r-- | examples/gui/bevel/beveltest.lpr | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/examples/gui/bevel/beveltest.lpr b/examples/gui/bevel/beveltest.lpr index f3e1a23c..4fae96c2 100644 --- a/examples/gui/bevel/beveltest.lpr +++ b/examples/gui/bevel/beveltest.lpr @@ -12,7 +12,8 @@ uses fpg_form, fpg_button, fpg_panel, - fpg_label; + fpg_label, + fpg_checkbox; type TMainForm = class(TfpgForm) @@ -25,6 +26,8 @@ type lblStyle: TfpgLabel; lblShape: TfpgLabel; lblNext: TfpgLabel; + chkDouble: TfpgCheckBox; + procedure chkDoubleChanged(Sender: TObject); procedure btnQuitClick(Sender: TObject); procedure btnStylesClick(Sender: TObject); procedure btnShapesClick(Sender: TObject); @@ -34,6 +37,14 @@ type { TMainForm } +procedure TMainForm.chkDoubleChanged(Sender: TObject); +begin + if chkDouble.Checked then + Bevel.BorderStyle := bsDouble + else + Bevel.BorderStyle := bsSingle; +end; + procedure TMainForm.btnQuitClick(Sender: TObject); begin Close; @@ -88,6 +99,8 @@ begin lblNext := CreateLabel(self, 200, 80, 'Next value is...'); btnShapes := CreateButton(self, 200, 100, 90, 'bsFrame', @btnShapesClick); btnStyles := CreateButton(self, 200, 130, 90, 'bsLowered', @btnStylesClick); + chkDouble := CreateCheckBox(self, 200, 160, 'Double Line'); + chkDouble.OnChange := @chkDoubleChanged; lblShape := CreateLabel(self, 6, 190, 'Shape is bsBox'); lblStyle := CreateLabel(self, 6, 210, 'Style is bsRaised'); |