V
v198022
Unregistered / Unconfirmed
GUEST, unregistred user!
本问题中的矩形不是一般的矩形是通过继承以下基类实现的。请大家帮忙改正,谢谢。
nit BsGraphic;
interface
uses
WinTypes, WinProcs, Messages, SysUtils, Classes, Controls,
Forms, ExtCtrls,sizercontrol,Graphics;
type
TBsGraphic=class(TCustomControl)
private
SizeControl: TSizerControl;
protected
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure BsGpaint; virtual;abstract;
published
// property color;
property PopUpMenu;
property OnDragDrop;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnKeyUp;
property OnKeyDown;
property OnKeyPress;
property OnEnter;
property OnExit;
end;
implementation
constructor TBsGraphic.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
Color:=clBlack;
// sizecontrol:=Tsizercontrol.Create(self,Tbsgraphic);
end;
destructor TBsGraphic.Destroy;
begin
inherited Destroy;
end;
end.
nit BsGraphic;
interface
uses
WinTypes, WinProcs, Messages, SysUtils, Classes, Controls,
Forms, ExtCtrls,sizercontrol,Graphics;
type
TBsGraphic=class(TCustomControl)
private
SizeControl: TSizerControl;
protected
public
constructor Create(AOwner: TComponent); override;
destructor Destroy; override;
procedure BsGpaint; virtual;abstract;
published
// property color;
property PopUpMenu;
property OnDragDrop;
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
property OnKeyUp;
property OnKeyDown;
property OnKeyPress;
property OnEnter;
property OnExit;
end;
implementation
constructor TBsGraphic.Create(AOwner: TComponent);
begin
inherited Create(AOwner);
Color:=clBlack;
// sizecontrol:=Tsizercontrol.Create(self,Tbsgraphic);
end;
destructor TBsGraphic.Destroy;
begin
inherited Destroy;
end;
end.