diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-08-02 14:37:56 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-08-02 14:37:56 +0000 |
commit | 958d5a73445966ae2d603155b065742806fb214c (patch) | |
tree | 829de873838c9604aba1e8f56c1166f1920a8bdb /prototypes | |
parent | 6bf99bfc8d520e299e6ebe81573f4e40ee6d708b (diff) | |
download | fpGUI-958d5a73445966ae2d603155b065742806fb214c.tar.xz |
* More work has been done to the PageControl. It looks like a PageControl, but doesn't function yet.
* Minor changes to TrackBar widget.
* Surfaced the SetPosition method in TfpgWidget to public.
* Created a new example project for the PageControl.
Diffstat (limited to 'prototypes')
-rw-r--r-- | prototypes/fpgui2/tests/edittest.dpr | 9 | ||||
-rw-r--r-- | prototypes/fpgui2/tests/themetest.lpi | 8 | ||||
-rw-r--r-- | prototypes/fpgui2/tests/themetest.lpr | 8 |
3 files changed, 15 insertions, 10 deletions
diff --git a/prototypes/fpgui2/tests/edittest.dpr b/prototypes/fpgui2/tests/edittest.dpr index cdeed6ff..511cd404 100644 --- a/prototypes/fpgui2/tests/edittest.dpr +++ b/prototypes/fpgui2/tests/edittest.dpr @@ -56,9 +56,11 @@ type procedure btnDisplayBMP(Sender: TObject); procedure btn3Click(Sender: TObject); procedure checkbox1Changed(Sender: TObject); + procedure TrackBarChanged(Sender: TObject; APosition: integer); public label1: TfpgLabel; label2: TfpgLabel; + lblTrackBarPos: TfpgLabel; edit1: TfpgEdit; edit2: TfpgEdit; btn: TfpgButton; @@ -307,6 +309,11 @@ begin edit1.Enabled := not checkbox1.Checked; end; +procedure TMainForm.TrackBarChanged(Sender: TObject; APosition: integer); +begin + lblTrackBarPos.Text := IntToStr(APosition); +end; + procedure TMainForm.AfterCreate; var i: integer; @@ -401,11 +408,13 @@ begin radiobtn3 := CreateRadioButton(self, 180, 305, 'Radio Three'); radiobtn1.Checked := True; + lblTrackBarPos := CreateLabel(self, 420, 200, '0'); trackbar1 := TfpgTrackBar.Create(self); trackbar1.Top := 230; trackbar1.Left := 335; trackbar1.Width := 100; trackbar1.Height := 25; + trackbar1.OnChange := @TrackBarChanged; trackbar2 := TfpgTrackBar.Create(self); trackbar2.Top := 230; diff --git a/prototypes/fpgui2/tests/themetest.lpi b/prototypes/fpgui2/tests/themetest.lpi index b10d0483..2e9f7080 100644 --- a/prototypes/fpgui2/tests/themetest.lpi +++ b/prototypes/fpgui2/tests/themetest.lpi @@ -1,7 +1,7 @@ <?xml version="1.0"?> <CONFIG> <ProjectOptions> - <PathDelim Value="\"/> + <PathDelim Value="/"/> <Version Value="5"/> <General> <Flags> @@ -9,7 +9,7 @@ </Flags> <SessionStorage Value="InProjectDir"/> <MainUnit Value="0"/> - <IconPath Value=".\"/> + <IconPath Value="./"/> <TargetFileExt Value=""/> </General> <VersionInfo> @@ -17,14 +17,13 @@ </VersionInfo> <PublishOptions> <Version Value="2"/> - <DestinationDirectory Value="$(TestDir)\publishedproject\"/> <IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/> <ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/> </PublishOptions> <RunParams> <local> <FormatVersion Value="1"/> - <LaunchingApplication PathPlusParams="\usr\X11R6\bin\xterm -T 'Lazarus Run Output' -e $(LazarusDir)\tools\runwait.sh $(TargetCmdLine)"/> + <LaunchingApplication PathPlusParams="/usr/X11R6/bin/xterm -T 'Lazarus Run Output' -e $(LazarusDir)/tools/runwait.sh $(TargetCmdLine)"/> </local> </RunParams> <RequiredPackages Count="1"> @@ -43,7 +42,6 @@ </ProjectOptions> <CompilerOptions> <Version Value="5"/> - <PathDelim Value="\"/> <CodeGeneration> <Generate Value="Faster"/> </CodeGeneration> diff --git a/prototypes/fpgui2/tests/themetest.lpr b/prototypes/fpgui2/tests/themetest.lpr index 7a99a55b..da310996 100644 --- a/prototypes/fpgui2/tests/themetest.lpr +++ b/prototypes/fpgui2/tests/themetest.lpr @@ -224,7 +224,7 @@ end; procedure TThemeButton.HandlePaint; var x, i: integer; - r: TfpgRect; + r: TRect; iy, y: integer; w: integer; pofs: integer; @@ -233,6 +233,7 @@ begin // inherited HandlePaint; Canvas.ClearClipRect; Canvas.Clear(clButtonFace); + r := Rect(0, 0, Width-1, Height-1); if State <> 1 then begin @@ -270,10 +271,7 @@ begin if not Enabled then Canvas.SetTextColor(clShadow1); - r.left := 2; - r.top := 2; - r.Width := Width - 4; - r.Height := Height - 4; + InflateRect(r, 2, 2); Canvas.SetClipRect(r); Canvas.SetFont(Font); |