From 831cb67e19cfe06c390cc632d1d6e8446acfa57c Mon Sep 17 00:00:00 2001 From: graemeg Date: Fri, 15 Feb 2008 13:58:18 +0000 Subject: * Applied Jean-Marc's TextColor and BackgroundColor patch. * Made many more modifications based on Jean-Marc's patch and fixed a few things missed. --- prototypes/fpgui2/tests/edittest.lpi | 9 ++++----- prototypes/fpgui2/tests/edittest.lpr | 10 ++++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) (limited to 'prototypes') diff --git a/prototypes/fpgui2/tests/edittest.lpi b/prototypes/fpgui2/tests/edittest.lpi index 8b8c2d24..2879bbde 100644 --- a/prototypes/fpgui2/tests/edittest.lpi +++ b/prototypes/fpgui2/tests/edittest.lpi @@ -1,15 +1,15 @@ - - + + - + @@ -23,7 +23,7 @@ - + @@ -47,7 +47,6 @@ - diff --git a/prototypes/fpgui2/tests/edittest.lpr b/prototypes/fpgui2/tests/edittest.lpr index d9f860bd..aa0dddbf 100644 --- a/prototypes/fpgui2/tests/edittest.lpr +++ b/prototypes/fpgui2/tests/edittest.lpr @@ -67,6 +67,7 @@ type procedure btn3Click(Sender: TObject); procedure checkbox1Changed(Sender: TObject); procedure TrackBarChanged(Sender: TObject; APosition: integer); + procedure xpsilverClick(Sender: TObject); public label1: TfpgLabel; label2: TfpgLabel; @@ -302,6 +303,14 @@ end; { TMainForm } +procedure TMainForm.xpsilverClick(Sender: TObject); +begin + if BackgroundColor = clWindowBackground then + BackgroundColor := clGreen + else + BackgroundColor := clWindowBackground; +end; + procedure TMainForm.Trackbar1Changed(Sender: TObject; APosition: integer); begin progress.Position := APosition; @@ -469,6 +478,7 @@ begin bmp.CreateMaskFromSample(0, 0); bmp.UpdateImage; xpsilver.ThemeImage := bmp; + xpsilver.OnClick := @xpsilverClick; checkbox1 := CreateCheckBox(self, 10, 265, 'Disable components'); checkbox1.OnChange := @checkbox1Changed; -- cgit v1.2.3-70-g09d2