How to programmatically alter Font properties in Firemonkey controls

前端 未结 2 501
醉话见心
醉话见心 2021-01-15 21:46

I have some code that paints a set of controls laid on top of a TImage. I then grab the TImage\'s MakeScreenshot to save out the file. This now works perfectly. What I am no

2条回答
  •  青春惊慌失措
    2021-01-15 21:56

    In firemonkey TLabel properties Font.Family and Font.Size are styled. If you want change font size or family in the code, you need to disable styling on this properties. To change this, set properly property StyledSettings.

    example:

    Label1.StyledSettings:=Label1.StyledSettings -[TStyledSetting.ssFamily,TStyledSetting.ssSize]
    

提交回复
热议问题