* Handle erase backgnd message

* Publish anchors

git-svn-id: https://svn.code.sf.net/p/lazarus-ccr/svn@1237 8e941d3f-bd1b-0410-a28a-d453659cc2b4
This commit is contained in:
blikblum
2010-06-19 18:03:37 +00:00
parent a4e7dc1149
commit 56f9293128

View File

@ -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;