Public Types in Delphi Components


I have subclassed an FMX component and I want to override a (Virtual) protected procedure.

This procedure has a number of params, which are declared as “public type” in the class of the component.

When I try to override the procedure, I get an error that one of the types is not declared although my component subclasses the original one. Shouldn’t I be able to get access to it?

The class is defined like this:

TTabControl = class (…)
public type
TTabBarButton = (Left, Right)
TTabBarButtons = set of TTabButton;
procedure DoUpdate(const TabBarButtons: TTabBarButtons; ….); virtual;


Now, I have subclassed this class and want to override DoUpdate.

TMyClass = class (TTabControl)
procedure DoUpdate(const TabBarButtons: TTabBarButtons; ….); override;

The compiler complains that TTabBarButtons in my class is not defined. If I redefine TTabBarButtons as public type in my class, then it says that the definition differs from the base class.

Can you please help me with this?

Thanks a lot.

Comments are closed.