How to efficiently let a `ParentFont = False` child control to use same font name as parent?

前端 未结 3 909
说谎
说谎 2021-01-21 12:28

Most VCL controls has Fonts and ParentFont property. It is a good practice to set ParentFont = True and the Fonts will follow it\'s paren

3条回答
  •  甜味超标
    2021-01-21 12:59

    I think that the simplest way to achieve your goals is to set no font properties at design time. Use ParentFont = True everywhere.

    Then at runtime make whatever modifications you need to make. That allows you to change the font face centrally, and still have the rest of your program pick it up.

提交回复
热议问题