Has anyone know how to get the width and height of a standard dialog based
font? So far I've gotten away with just manually setting the sizes, but for
layout calculations you need this info.
Under DC you use the method:
xht, yht = DC.GetTextExtent("X")
How is this referenced when using a wxPanel or wxDialog, etc.
Has anyone know how to get the width and height of a standard dialog based
font? So far I've gotten away with just manually setting the sizes, but
for
layout calculations you need this info.
Under DC you use the method:
xht, yht = DC.GetTextExtent("X")
How is this referenced when using a wxPanel or wxDialog, etc.
The wxWindow base class also has GetTextExtent.
But why not just use Dialog Units? wxDLG_PNT and wxDLG_SZE each take a
reference to the window and a set of "dialog unit" coordinants or sizes and
convert them to an actual wxPoint or wxSize based upon the average character
width and height of the default font. For example: