-
Notifications
You must be signed in to change notification settings - Fork 45
Description
Hello,
I encountered a compatibility issue when using the Vcl.StyledComponentsHooks interposer with TBitBtn.
Steps to reproduce
Create a form with a standard TBitBtn
Set ParentFont = False
Add Vcl.StyledComponentsHooks to the form's uses
Reopen or run the form
Result
The form fails to load with the error:
Error reading BitBtn1.ParentFont: Property ParentFont does not exist
Cause
The interposer defines:
TBitBtn = class(TStyledBitBtn) end;
Existing DFMs created with the standard Vcl.Buttons.TBitBtn often contain:
ParentFont = False
During DFM streaming Delphi tries to read this property, but it seems TStyledBitBtn does not publish ParentFont in the same way.
Workaround
Setting:
ParentFont = True
removes the error.
Environment
Delphi 12 Athens
VCL application
StyledComponentsHooks interposer
Suggestion
Maybe TStyledBitBtn should publish ParentFont (for compatibility with existing DFMs), or this limitation could be mentioned in the documentation.