diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-11-02 14:05:53 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-11-02 14:05:53 +0000 |
commit | aae6921b382bbe1a6a0aff25d065494ab2a2abc7 (patch) | |
tree | ae4c946b44bfe9926653144ff590eb43c24b09e2 | |
parent | 02b76c9531c81b277a459ae72739298c9fee7dd0 (diff) | |
download | fpGUI-aae6921b382bbe1a6a0aff25d065494ab2a2abc7.tar.xz |
* New Background property for TfpgBevel
-rw-r--r-- | src/gui/gui_bevel.pas | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/gui/gui_bevel.pas b/src/gui/gui_bevel.pas index 84406a46..faad992e 100644 --- a/src/gui/gui_bevel.pas +++ b/src/gui/gui_bevel.pas @@ -39,6 +39,8 @@ type private FBevelShape: TBevelShape; FBevelStyle: TBevelStyle; + FBackgroundColor: TfpgColor; + procedure SetBackgroundColor(const AValue: TfpgColor); procedure SetBevelShape(const AValue: TBevelShape); procedure SetBevelStyle(const AValue: TBevelStyle); protected @@ -48,6 +50,7 @@ type published property Shape: TBevelShape read FBevelShape write SetBevelShape default bsBox; property Style: TBevelStyle read FBevelStyle write SetBevelStyle default bsRaised; + property BackgroundColor: TfpgColor read FBackgroundColor write SetBackgroundColor default clWindowBackground; end; @@ -80,6 +83,12 @@ begin Repaint; end; +procedure TfpgBevel.SetBackgroundColor(const AValue: TfpgColor); +begin + if FBackgroundColor=AValue then exit; + FBackgroundColor:=AValue; +end; + procedure TfpgBevel.SetBevelStyle(const AValue: TBevelStyle); begin if FBevelStyle = AValue then @@ -92,7 +101,7 @@ procedure TfpgBevel.HandlePaint; begin Canvas.BeginDraw; inherited HandlePaint; - Canvas.Clear(clWindowBackground); + Canvas.Clear(BackgroundColor); // Canvas.SetLineStyle(2, lsSolid); // Canvas.SetColor(clWindowBackground); @@ -138,6 +147,7 @@ begin FWidth := 80; FHeight := 80; FFocusable := True; // otherwise children can't get focus + FBackgroundColor := clWindowBackground; end; end. |