在D7中ExtCtrls单元中有个TCustomLabeledEdit类在此类中定义了Private类型的变量
FEditLabel:TBoundLabel;而在TBoundLabel的public和published部分没有定义FocusControl属性
在TBoundLabel的父类TCustomLabel的Protected部分定义了FocusControl属性。问题是什么呢?
大家都知道Protected只能在自类中使用但这里为什么FEditLabel变量能在TCustomLabeledEdit的
procedure TCustomLabeledEdit.SetupInternalLabel;
begin
..
FEditLabel.FocusControl:=self;
end;
中使用呢
FEditLabel:TBoundLabel;而在TBoundLabel的public和published部分没有定义FocusControl属性
在TBoundLabel的父类TCustomLabel的Protected部分定义了FocusControl属性。问题是什么呢?
大家都知道Protected只能在自类中使用但这里为什么FEditLabel变量能在TCustomLabeledEdit的
procedure TCustomLabeledEdit.SetupInternalLabel;
begin
..
FEditLabel.FocusControl:=self;
end;
中使用呢
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货