Z
zyycc
Unregistered / Unconfirmed
GUEST, unregistred user!
这个控件的Event如何Published?
我编写了一个带Button的Edit,但我想分别Publish其中Button的
与Edit的onClick事件,这能实现吗?
目前,我的代码如下:
type
TEditButton = class(TCustomControl)
private
FEdit: TEdit;
FButton: TButton;
function GetEditText: string;
function GetButtonText: string;
procedure SetButtonText(const Value: string);
procedure SetEditText(const Value: string);
function GetEditReadOnly: Boolean;
procedure SetEditReadOnly(const Value: Boolean);
protected
procedure WmSize(var Message: TMessage); message WM_SIZE;
procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED;
public
constructor Create(AOwner: TComponent); override;
published
property EditText: string read GetEditText write SetEditText;
property Font;
property ButtonText: string read GetButtonText write SetButtonText;
property EditReadOnly: Boolean read GetEditReadOnly write SetEditReadOnly;
end;
我编写了一个带Button的Edit,但我想分别Publish其中Button的
与Edit的onClick事件,这能实现吗?
目前,我的代码如下:
type
TEditButton = class(TCustomControl)
private
FEdit: TEdit;
FButton: TButton;
function GetEditText: string;
function GetButtonText: string;
procedure SetButtonText(const Value: string);
procedure SetEditText(const Value: string);
function GetEditReadOnly: Boolean;
procedure SetEditReadOnly(const Value: Boolean);
protected
procedure WmSize(var Message: TMessage); message WM_SIZE;
procedure CMFontChanged(var Message: TMessage); message CM_FONTCHANGED;
public
constructor Create(AOwner: TComponent); override;
published
property EditText: string read GetEditText write SetEditText;
property Font;
property ButtonText: string read GetButtonText write SetButtonText;
property EditReadOnly: Boolean read GetEditReadOnly write SetEditReadOnly;
end;