[Lazarus] how to get Type of Sender or Components[i] in order to Cast?

Sven Barth pascaldragon at googlemail.com
Mon Jul 27 14:21:50 CEST 2015


Am 27.07.2015 12:06 schrieb "Mark Morgan Lloyd" <
markMLl.lazarus at telemetry.co.uk>:
>
> Péter Gábor wrote:
>>
>> If you use the classname property you can:
>>
>> case Sender.classname of
>>   'TCheckBox': ShowMessage('This is a TCheckBox');
>> end;
>
>
> Good point. I wonder if that's mode-specific (language manual simply says
"Free Pascal allows").

I'm not aware that it is mode specific. But it will work only with FPC ;)

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20150727/032880b3/attachment-0003.html>


More information about the Lazarus mailing list