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

Péter Gábor ptrg at freemail.hu
Mon Jul 27 11:41:50 CEST 2015


If you use the classname property you can:

case Sender.classname of
  'TCheckBox': ShowMessage('This is a TCheckBox');
end;

2015-07-27 09:31 keltezéssel, Mark Morgan Lloyd írta:
> Péter Gábor wrote:
>>
>> if Sender = TButton then { do something} ;
> 
> Can this be elegantly put into a case statement?
> 

-- 
Péter Gábor
ptrg at freemail.hu





More information about the Lazarus mailing list