从下面这个继承情况你应该就明白了,
TEdit = class(TCustomEdit)
↑
TCustomEdit = class(TWinControl)
↑
TWinControl = class(TControl)
↑
TControl = class(TComponent)
TControl 的属性是TCaption
,TCaption 就是string。想要123只能自己转。
property Text: TCaption read GetText write SetText;
TCaption = type string;