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

Michael Schnell mschnell at lumino.de
Mon Jul 27 13:33:50 CEST 2015


On 07/27/2015 07:47 AM, Péter Gábor wrote:
> if Sender = TButton then { do something} ;
I suppose you meant

if Sender is TButton then { do something} ;


OP: If you want to deal with a lot of different classes that might be the sender, it might help to define an array of these classes (types) and search it.


-Michael





More information about the Lazarus mailing list