diff --git a/lcl/controls.pp b/lcl/controls.pp index 4dd0fb68f9..ab7e127780 100644 --- a/lcl/controls.pp +++ b/lcl/controls.pp @@ -1361,6 +1361,8 @@ type function IsVisible: Boolean; virtual;// checks parents too function IsControlVisible: Boolean; virtual;// does not check parents function IsEnabled: Boolean; // checks parent too + function IsParentColor: Boolean; // checks protected ParentColor, needed by widgetsets + function IsParentFont: Boolean; // checks protected ParentFont, needed by widgetsets function IsParentShowHint: Boolean; // checks protected ParentShowHint prop. function FormIsUpdating: boolean; virtual; function IsProcessingPaintMsg: boolean; diff --git a/lcl/include/control.inc b/lcl/include/control.inc index 3002fd9216..61d376d0ce 100644 --- a/lcl/include/control.inc +++ b/lcl/include/control.inc @@ -675,6 +675,34 @@ begin until (TheControl = nil) or (not Result); end; +{------------------------------------------------------------------------------ + Method: TControl.IsParentColor + Params: none + Returns: Boolean + + Used at places where we need to check ParentColor property from TControl. + Property is protected, so this function avoids hacking to get + protected property value. + ------------------------------------------------------------------------------} +function TControl.IsParentColor: Boolean; +begin + Result := FParentColor; +end; + +{------------------------------------------------------------------------------ + Method: TControl.IsParentFont + Params: none + Returns: Boolean + + Used at places where we need to check ParentFont property from TControl. + Property is protected, so this function avoids hacking to get + protected property value. + ------------------------------------------------------------------------------} +function TControl.IsParentFont: Boolean; +begin + Result := FParentFont; +end; + {------------------------------------------------------------------------------ Method: TControl.IsParentShowHint Params: none