I have a custom Firemonkey control that extends TEdit
which is dynamically created on a form. I am attempting to set it's font size when it is created using:
Search->Font->Size = 15;
However, the font remains unchanged on the control.
I have another control of the same type that is already on the form which I can change the font size programmatically. I noticed with this control, that if the Size
setting is set to false in the StyledSettings
properties I can change the font, whereas if the Size
setting is set to true, I cannot change the font size.
So, when I create my custom control, I am trying to programmatically set the Size
property to false, however I cannot figure out how to do so.
I have tried:
Search->StyledSettings.Size = false;
and
Search->StyledSettings = ListBox->StyledSettings - [TStyledSetting.ssSize];
neither of which will even compile. How can I make sure this property is removed on my custom control at run time? Or is there another way I should be setting its font?
This is documented behavior:
Using the StyledSettings Property
FMX.Graphics.ITextSettings
The correct syntax in C++ is: