Override issue lazarus / 31-LCL ---------------------------------------------------------------------- typo · 2013-07-17 08:41 I want to override setter method for TCustomLabel Caption, but I can not find a way. When I write: Code: [Select]private   procedure SetText(const Value: TCaption); override; compiler says: Code: [Select]Error: There is no method in an ancestor class to be overridden. But SetText method is there, on TControl class. What should I do? ---------------------------------------------------------------------- taazz · 2013-07-17 08:50 SetText is defined as private, on top of that it is not defined as virtual or dynamic which means that you can't override it even if it was protected or public. Fear not though internally the SetText is calling the method RealSetText to do what ever is needed to be done so override that one and you are set. ---------------------------------------------------------------------- typo · 2013-07-17 08:53 Thanks.