How can I get the size (in pixels) of the biggest glyph in the current font for
a given wxWindow object ? I'd like to be able to build a wxTextCtrl big enough
to enter, say 10 chars, and let it work on multiple plateforms.
How can I get the size (in pixels) of the biggest glyph in the current
font for
a given wxWindow object ? I'd like to be able to build a wxTextCtrl big
enough
to enter, say 10 chars, and let it work on multiple plateforms.
There's no way to get the size of the widest character without knowing what
that character is, but you can get some good approximations with the methods
that are available. Something like this might be good enough for you:
There's no way to get the size of the widest character without knowing
what
that character is, but you can get some good approximations with the
methods
that are available. Something like this might be good enough for you:
w, h = window.GetTextExtent('W' * 10)
This is exactly what I was looking for. Thank you very much. BtW, is there a FAQ
available somewhere (about wxPython and/or wxWindows)?