diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-08-13 12:20:19 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-08-13 12:20:19 +0000 |
commit | 1bcd4ff57784e070cd26cb81c5700531deece1e1 (patch) | |
tree | de7576ce6d0bef6df6d7ea850f1be74392765741 /prototypes/fpgui2 | |
parent | a8f5bbc7a653e967e5b9b12dd749f7407dc46bb1 (diff) | |
download | fpGUI-1bcd4ff57784e070cd26cb81c5700531deece1e1.tar.xz |
* Renamed the TfpgTrackbar to TfpgTrackBarExtra.
* Implemented a new TfpgTrackbar that has the look of the Windows 2000 slider control.
* Fixed the Scrollbar flashing issue that occured when you scroll to the minimum position using the Slider button.
Diffstat (limited to 'prototypes/fpgui2')
-rw-r--r-- | prototypes/fpgui2/tests/edittest.dpr | 12 | ||||
-rw-r--r-- | prototypes/fpgui2/tests/themetest.lpr | 25 |
2 files changed, 30 insertions, 7 deletions
diff --git a/prototypes/fpgui2/tests/edittest.dpr b/prototypes/fpgui2/tests/edittest.dpr index 6ce6d4d9..e77cef28 100644 --- a/prototypes/fpgui2/tests/edittest.dpr +++ b/prototypes/fpgui2/tests/edittest.dpr @@ -86,7 +86,7 @@ type radiobtn2: TfpgRadioButton; radiobtn3: TfpgRadioButton; trackbar1: TfpgTrackBar; - trackbar2: TfpgTrackBar; + trackbar2: TfpgTrackBarExtra; w: TMyWidget; procedure AfterCreate; override; end; @@ -440,20 +440,22 @@ 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); + trackbar1.ShowPosition := True; + + lblTrackBarPos := CreateLabel(self, 420, 200, '0'); + + trackbar2 := TfpgTrackBarExtra.Create(self); trackbar2.Top := 230; trackbar2.Left := 440; trackbar2.Orientation := orVertical; trackbar2.Width := 25; trackbar2.Height := 100; + trackbar2.OnChange := @TrackBarChanged; end; procedure MainProc; diff --git a/prototypes/fpgui2/tests/themetest.lpr b/prototypes/fpgui2/tests/themetest.lpr index 65b65fc8..868fc8e1 100644 --- a/prototypes/fpgui2/tests/themetest.lpr +++ b/prototypes/fpgui2/tests/themetest.lpr @@ -15,7 +15,8 @@ uses gui_button, gui_label, gfx_imgfmt_bmp, - gfx_extinterpolation; + gfx_extinterpolation, + gui_trackbar; type { Note: @@ -82,7 +83,9 @@ type sbsilver: TThemeScrollbar; sblunaHor: TThemeScrollbar; sbsilverHor: TThemeScrollbar; - private + trackbar: TfpgTrackBar; + lblTrackBar: TfpgLabel; + procedure TrackBarChange(Sender: TObject; APosition: integer); procedure btnCloseClick(Sender: TObject); procedure CreateButtons; procedure CreateScrollbars; @@ -383,6 +386,11 @@ end; { TMainForm } +procedure TMainForm.TrackBarChange(Sender: TObject; APosition: integer); +begin + lblTrackBar.Text := IntToStr(APosition); +end; + procedure TMainForm.btnCloseClick(Sender: TObject); begin Close; @@ -564,6 +572,19 @@ begin CreateButtons; CreateScrollbars; + + lblTrackBar := CreateLabel(self, 190, 265, '--'); + + trackbar := TfpgTrackBar.Create(self); + trackbar.Width := 150; + trackbar.Orientation := orHorizontal; + trackbar.Min := 0; + trackbar.Max := 10; + trackbar.Top := 265; + trackbar.Left := 20; +// trackbar.Position := 50; + trackbar.OnChange := @TrackBarChange; + trackbar.ShowPosition := True; end; |