**请问怎样给Bevel控件增加事件?** (100分)

T

tyy96

Unregistered / Unconfirmed
GUEST, unregistred user!
写一个从Bevel继承的控件,想给它增加MouseMove、Enter、Exit 事件,

如何做到, 谢谢!

学习中.......
 
下面是TBevel的继承关系
TControl->TGraphicContrl->TBevel
TControl是有鼠标事件的,我想直接要写一个这样的组件,直接把这些时间发布出来应该
就可以了。
 
我做了一个测试,是可以的,代码如下:
unit uWQBevel;

interface

uses
SysUtils, Classes, Controls, ExtCtrls;

type
TWQBevel = class(TBevel)
private
{ Private declarations }
protected
{ Protected declarations }
public
{ Public declarations }
published
{ Published declarations }
property OnMouseDown;
property OnMouseMove;
property OnMouseUp;
end;

procedure Register;

implementation

procedure Register;
begin
RegisterComponents('Seven', [TWQBevel]);
end;

end.
 
严重同意seven_918,呵呵!
 

Similar threads

S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
D
回复
0
查看
466
DelphiTeacher的专栏
D
S
回复
0
查看
1K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
946
SUNSTONE的Delphi笔记
S
顶部