summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorgraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-08-06 15:09:11 +0000
committergraemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf>2007-08-06 15:09:11 +0000
commitf11fffeb438a1d3457629d183fe96657d12c9546 (patch)
treefb3d451acc3201c7bced7075beb83493928929bb /examples
parent00a0e93ffe1635157c834e58d3b9c18c841bc062 (diff)
downloadfpGUI-f11fffeb438a1d3457629d183fe96657d12c9546.tar.xz
* Implemented Canvas.FillGradient().
* Made some improvements to the TfpgBaseGrid painting. Still have lots outstanding though.
Diffstat (limited to 'examples')
-rw-r--r--examples/corelib/canvastest/fpgcanvas.lpr4
-rw-r--r--examples/gui/gridtest/gridtest.lpi1
-rw-r--r--examples/gui/gridtest/gridtest.lpr24
3 files changed, 27 insertions, 2 deletions
diff --git a/examples/corelib/canvastest/fpgcanvas.lpr b/examples/corelib/canvastest/fpgcanvas.lpr
index 23dbb03a..1ed2c1c0 100644
--- a/examples/corelib/canvastest/fpgcanvas.lpr
+++ b/examples/corelib/canvastest/fpgcanvas.lpr
@@ -170,6 +170,10 @@ begin
Canvas.FillArc(5, 290, 50, 50, 0, 270); // should overlap rectangle pixels
+ // Gradient testing
+ r := Rect(265, 340, 450, 375);
+ Canvas.GradientFill(r, clBlue, clMagenta, gdHorizontal);
+
Canvas.EndDraw;
end;
diff --git a/examples/gui/gridtest/gridtest.lpi b/examples/gui/gridtest/gridtest.lpi
index 67f95b9b..9b698ffe 100644
--- a/examples/gui/gridtest/gridtest.lpi
+++ b/examples/gui/gridtest/gridtest.lpi
@@ -17,7 +17,6 @@
</VersionInfo>
<PublishOptions>
<Version Value="2"/>
- <IgnoreBinaries Value="False"/>
<IncludeFileFilter Value="*.(pas|pp|inc|lfm|lpr|lrs|lpi|lpk|sh|xml)"/>
<ExcludeFileFilter Value="*.(bak|ppu|ppw|o|so);*~;backup"/>
</PublishOptions>
diff --git a/examples/gui/gridtest/gridtest.lpr b/examples/gui/gridtest/gridtest.lpr
index 2bf0c7a2..6e386c3f 100644
--- a/examples/gui/gridtest/gridtest.lpr
+++ b/examples/gui/gridtest/gridtest.lpr
@@ -10,7 +10,8 @@ uses
fpgfx,
gui_form,
gui_grid,
- gui_button;
+ gui_button,
+ gui_checkbox;
type
@@ -19,6 +20,10 @@ type
private
btnQuit: TfpgButton;
grdMain: TfpgBaseGrid;
+ chkShowHeader: TfpgCheckBox;
+ chkShowGrid: TfpgCheckBox;
+ procedure chkShowHeaderChange(Sender: TObject);
+ procedure chkShowGridChange(Sender: TObject);
procedure btnQuitClick(Sender: TObject);
public
constructor Create(AOwner: TComponent); override;
@@ -26,6 +31,16 @@ type
{ TMainForm }
+procedure TMainForm.chkShowHeaderChange(Sender: TObject);
+begin
+ grdMain.ShowHeader := chkShowHeader.Checked;
+end;
+
+procedure TMainForm.chkShowGridChange(Sender: TObject);
+begin
+ grdMain.ShowGrid := chkShowGrid.Checked;
+end;
+
procedure TMainForm.btnQuitClick(Sender: TObject);
begin
Close;
@@ -49,6 +64,13 @@ begin
grdMain.Height := 300;
grdMain.Anchors := [anLeft, anTop, anRight, anBottom];
+ chkShowHeader := CreateCheckBox(self, 10, 320, 'Show Header');
+ chkShowHeader.Checked := True;
+ chkShowHeader.OnChange := @chkShowHeaderChange;
+
+ chkShowGrid := CreateCheckBox(self, chkShowHeader.Right+10, 320, 'Show Grid');
+ chkShowGrid.Checked := True;
+ chkShowGrid.OnChange := @chkShowGridChange;
end;