Difference between revisions of "Dabo.ui.fontMetric"
(Created page with "== Signature: == <syntaxhighlight lang="python"> dabo.ui.fontMetric(txt=None, wind=None, face=None, size=None, bold=None, italic=None) </syntaxhighlight> == Description: ==...")
Latest revision as of 16:06, 14 May 2020
dabo.ui.fontMetric(txt=None, wind=None, face=None, size=None, bold=None, italic=None)
Calculate the width and height of the given text using the supplied font information. If any font parameters are missing, they are taken from the specified window, or, if no window is specified, the currently active form. If no form is active, the app's
MainForm is used.
A 2-tuple containing the (width, height) of the specified text.
Sometimes it is necessary to see just how big a given bit of text will be. This method allows you to specify as many aspects about the text's appearance, and will return the width and height for those specs.