1
votes

I can't seem to figure out how to change the font of a tmenuitem object. I add a menubar, and add a item to it. I create a customstyle for the menuitem. I can change the background color and stroke color etc,etc, but I can NOT change the font of the text part. If I change the font (size or name or anything) it shows in the style editor but does not show in the form designer or at runtime. Seems the font somehow default to something. Has anyone else been able to do this ?

1

1 Answers

0
votes

FireMonkey overwrites pretty much any settings you make for fonts (face, size, style) within a style. AFAIK any font changes you want to make have to be done at run time. In the case of a TMenuItem that means by setting the Font property manually after you have created the menu item.

However (and I've never played with this) I seen people saying they can change a font by setting the StyleLookup after a component has been created.

You might want to hook into the OnApplyStyleLookup event to make these updates.