[fpc-pascal] Property alias

Howard Page-Clark hdpc at talktalk.net
Fri Dec 7 16:12:21 CET 2012


On 07/12/12 2:50, Krzysztof wrote:
> Hi,
>
> Interfaces can have aliases for functions:
>
>      Function MyOtherFunction : Integer;
>      Function IMyInterface.MyFunc = MyOtherFunction;
>
> Can normal object have aliases for properties? For example,
> TControl.Caption. I would like to publish this property in my descendant
> as "MyExtraText". Is this possible?

You can, of course, define a MyExtraText property with a setter and 
getter that refer to an existing property (or data field if it is 
accessible).

Howard




More information about the fpc-pascal mailing list