I've developed an inherited TCheckBox that needs some style fixes.
I've achieved this in the past with other firemonkey controls by overriding the "GetStyleObject" method and doing the necessary fixes "on the fly", over the original style object.
My intention with this "cleaner" approach is to allow the user to load any default firemonkey style, and still be able to code my own version of some styled controls.
Ex.:
type
TMyCheckBox = class(TCheckBox)
protected
function GetStyleObject: TFmxObject; override;
end;
function TMyCheckBox.GetStyleObject: TFmxObject;
begin
Result := inherited;
{do the required changes over the returned object}
end;
However, with this code, strangely "TMyCheckBox.GetStyleObject" never gets called, but with other controls like custom "TreeViewItem" it does...
Any thoughts?
Thank you all in advance.