I use Borland C++ Builder 2009 and when a large font is used, the Menu items in MainMenu and Popup are too close to each other, text cut off on top and bottom even, when too big.
I understand I can change the height of the items with TMenuItem.OnMeasureItem
but to what height should I set it ?
What's the best way to calculate an ideal height and how do I get the variables for it (e.g. height of text)?
OnMeasureItem
handlers suggests you default value inHeight
var parameter.You can multiply this value by ratio of current screen PPI and default PPI for font size 100% (96), e.g.
Height := Ceil(Height * Screen.PixelsPerInch / 96);