E
eon_ian
Unregistered / Unconfirmed
GUEST, unregistred user!
各位大富翁,下面的控件有一个问题,就是放在它上面的tgraphiccontrol控件(如tlabel)
不能自动刷新,怎么才能达到panel的效果呢,少写了什么?
interface
uses Controls,classes;
type
TTestControl=class(TCustomControl)
public
constructor Create(AOwner: TComponent); override;
end;
procedure Register;
implementation
{ TTestControl }
constructor TTestControl.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
ControlStyle := [csAcceptsControls, csCaptureMouse, csClickEvents,
csOpaque, csDoubleClicks, csReplicatable];
end;
procedure Register;
begin
RegisterComponents('mycontrols', [TTestControl]);
end;
end.
不能自动刷新,怎么才能达到panel的效果呢,少写了什么?
interface
uses Controls,classes;
type
TTestControl=class(TCustomControl)
public
constructor Create(AOwner: TComponent); override;
end;
procedure Register;
implementation
{ TTestControl }
constructor TTestControl.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
ControlStyle := [csAcceptsControls, csCaptureMouse, csClickEvents,
csOpaque, csDoubleClicks, csReplicatable];
end;
procedure Register;
begin
RegisterComponents('mycontrols', [TTestControl]);
end;
end.