diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-07-03 13:33:37 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-07-03 13:33:37 +0000 |
commit | f742b03ed3afc5b55df65a6bb8a3e2984479ac4b (patch) | |
tree | ae97eef9ef5d32ffd35641dafa79fd8f55e1f690 /prototypes/fpgui2 | |
parent | efba2eb356e50dc12e1da032c0b9a796463844ae (diff) | |
download | fpGUI-f742b03ed3afc5b55df65a6bb8a3e2984479ac4b.tar.xz |
* EditTest in the prototypes directory now tests Button ImageLayout property.
* TfpgBevel has been added to the UI Designer component palette.
* TfpgBevel is used in the UI Designer and Shape=Spacer it paints itself different in the UI Designer, so it's more visible. At runtime it doesn't paint like that.
Diffstat (limited to 'prototypes/fpgui2')
-rw-r--r-- | prototypes/fpgui2/tests/edittest.lpr | 29 |
1 files changed, 23 insertions, 6 deletions
diff --git a/prototypes/fpgui2/tests/edittest.lpr b/prototypes/fpgui2/tests/edittest.lpr index dd407ad8..24fb9db0 100644 --- a/prototypes/fpgui2/tests/edittest.lpr +++ b/prototypes/fpgui2/tests/edittest.lpr @@ -68,6 +68,7 @@ type procedure checkbox1Changed(Sender: TObject); procedure TrackBarChanged(Sender: TObject; APosition: integer); procedure xpsilverClick(Sender: TObject); + procedure Combo1Changed(Sender: TObject); public label1: TfpgLabel; label2: TfpgLabel; @@ -311,6 +312,17 @@ begin BackgroundColor := clWindowBackground; end; +procedure TMainForm.Combo1Changed(Sender: TObject); +begin + // ilImageLeft, ilImageTop, ilImageRight, ilImageBottom + case combo1.FocusItem of + 0: btn.ImageLayout := ilImageLeft; + 1: btn.ImageLayout := ilImageTop; + 2: btn.ImageLayout := ilImageRight; + 3: btn.ImageLayout := ilImageBottom; + end; +end; + procedure TMainForm.Trackbar1Changed(Sender: TObject; APosition: integer); begin progress.Position := APosition; @@ -427,14 +439,19 @@ begin btn := CreateButton(self, 10, 130, 75, 'Close', @btnCloseClick); btn.ImageName := 'stdimg.close'; btn.ShowImage := True; + btn.Height := 55; - combo1 := CreateComboBox(self, 10, 160, 120, nil); + combo1 := CreateComboBox(self, 10, 200, 120, nil); combo1.BackgroundColor := clYellow; - combo1.TextColor := clRed; - for i := 1 to 5 do - combo1.Items.Add(Format('Items %.2d', [i])); - - combo2 := CreateComboBox(self, 10, 190, 120, nil); + combo1.TextColor := clBlue; + combo1.Items.Add('ilImageLeft'); + combo1.Items.Add('ilImageTop'); + combo1.Items.Add('ilImageRight'); + combo1.Items.Add('ilImageBottom'); + combo1.FocusItem := 0; + combo1.OnChange := @Combo1Changed; + + combo2 := CreateComboBox(self, 10, 230, 120, nil); for i := 1 to 20 do combo2.Items.Add(Format('Items %.2d', [i])); |