diff --git a/components/smnetgradient/smnetgradient.pas b/components/smnetgradient/smnetgradient.pas index 8d08b9c23..de602e2f5 100644 --- a/components/smnetgradient/smnetgradient.pas +++ b/components/smnetgradient/smnetgradient.pas @@ -42,7 +42,7 @@ interface uses LCLIntf, LCLType, SysUtils, Classes, Graphics, Controls, Forms, - Dialogs, GraphType, Db, DBCtrls; + Dialogs, GraphType, Db, DBCtrls, LMessages; Const DefaultStyle = DT_SINGLELINE or DT_END_ELLIPSIS or DT_EXPANDTABS; @@ -92,8 +92,6 @@ type property Visible: Boolean read FVisible write SetVisible default True; end; - { TNetGradient } - { TCustomNetGradient } TCustomNetGradient = class(TCustomControl) @@ -143,6 +141,7 @@ type procedure SetLayout(Value: TTextLayout); virtual; procedure SetBevelInner(Value: TLabelBevel); procedure SetBevelOuter(Value: TLabelBevel); + procedure WMEraseBkgnd(var Message: TLMEraseBkgnd); message LM_ERASEBKGND; property CaptionAlignment: TAlignment read FAlignment write SetAlignment; property CaptionLayout: TTextLayout read FLayout write SetLayout default tlCenter; property BevelInner: TLabelBevel read FBevelInner write SetBevelInner default bvNone; @@ -171,14 +170,17 @@ type procedure EndUpdate; end; + { TNetGradient } + TNetGradient = class (TCustomNetGradient) published - property CaptionAlignment; - property CaptionLayout; + property Anchors; property BevelInner; property BevelOuter; property BeginColor; property BorderColor; + property CaptionAlignment; + property CaptionLayout; property EndColor; property FlatBorder; property FillDirection; @@ -190,6 +192,7 @@ type property SubCaption; //default properties property Align; + property Anchors; property BorderSpacing; property BorderWidth; property DragCursor; @@ -245,6 +248,7 @@ type property SubCaption; //default properties property Align; + property Anchors; property BorderSpacing; property BorderWidth; property DragCursor; @@ -690,6 +694,11 @@ begin end; end; +procedure TCustomNetGradient.WMEraseBkgnd(var Message: TLMEraseBkgnd); +begin + // Do nothing. Just to avoid flicker. +end; + procedure TCustomNetGradient.OnFontChanged(Sender: TObject); begin Changed;