wx.FontData¶
This class holds a variety of information related to font dialogs.
See also
Class Hierarchy¶
Methods Summary¶
Constructor. |
|
Enables or disables “effects” under Windows or generic only. |
|
Under Windows, returns a flag determining whether symbol fonts can be selected. |
|
Gets the font chosen by the user if the user pressed |
|
Gets the colour associated with the font dialog. |
|
Determines whether “effects” are enabled under Windows. |
|
Gets the font that will be initially used by the font dialog. |
|
Returns the state of the flags restricting the selection. |
|
Returns |
|
Restricts the selection to a subset of the available fonts. |
|
Under Windows, determines whether symbol fonts can be selected. |
|
Sets the font that will be returned to the user (for internal use only). |
|
Sets the colour that will be used for the font foreground colour. |
|
Sets the font that will be initially used by the font dialog. |
|
Sets the valid range for the font point size (Windows only). |
|
Determines whether the Help button will be displayed in the font dialog (Windows only). |
Properties Summary¶
See |
|
See |
|
See |
|
See |
Class API¶
- class wx.FontData(Object)¶
Possible constructors:
FontData() -> None
This class holds a variety of information related to font dialogs.
Methods¶
- __init__(self)¶
Constructor.
Initializes fontColour to black, showHelp to
False
, allowSymbols toTrue
, enableEffects toTrue
, minSize to 0 and maxSize to 0.- Return type:
None
- EnableEffects(self, enable)¶
Enables or disables “effects” under Windows or generic only.
This refers to the controls for manipulating colour, strikeout and underline properties.
The default value is
True
.- Parameters:
enable (bool)
- Return type:
None
- GetAllowSymbols(self)¶
Under Windows, returns a flag determining whether symbol fonts can be selected.
Has no effect on other platforms.
The default value is
True
.- Return type:
bool
- GetChosenFont(self)¶
Gets the font chosen by the user if the user pressed
wx.OK
(wx.FontDialog.ShowModal
returnedwx.ID_OK
).- Return type:
- GetColour(self)¶
Gets the colour associated with the font dialog.
The default value is black.
- Return type:
- GetEnableEffects(self)¶
Determines whether “effects” are enabled under Windows.
This refers to the controls for manipulating colour, strikeout and underline properties.
The default value is
True
.- Return type:
bool
- GetInitialFont(self)¶
Gets the font that will be initially used by the font dialog.
This should have previously been set by the application.
- Return type:
- GetRestrictSelection(self)¶
Returns the state of the flags restricting the selection.
Note that currently these flags are only effectively used in wxMSW.
The default value is
FONTRESTRICT_NONE
.- Return type:
int
- Returns:
FONTRESTRICT_NONE
If no restriction applies, or a combination of the following flags:FONTRESTRICT_SCALABLE
To show only scalable fonts - no raster fonts.FONTRESTRICT_FIXEDPITCH
To show only monospaced fonts.
Added in version 4.1/wxWidgets-3.1.4.
- GetShowHelp(self)¶
Returns
True
if the Help button will be shown (Windows only).The default value is
False
.- Return type:
bool
- RestrictSelection(self, flags)¶
Restricts the selection to a subset of the available fonts.
Note that currently these flags are only effectively used in wxMSW and are ignored in the other ports.
Possible values are:
FONTRESTRICT_NONE
No restriction, show all fonts in the dialog.FONTRESTRICT_SCALABLE
To show only scalable fonts - no raster fonts.FONTRESTRICT_FIXEDPITCH
To show only monospaced fonts.
The default value is
FONTRESTRICT_NONE
.- Parameters:
flags (int)
- Return type:
None
Added in version 4.1/wxWidgets-3.1.4.
- SetAllowSymbols(self, allowSymbols)¶
Under Windows, determines whether symbol fonts can be selected.
Has no effect on other platforms.
The default value is
True
.- Parameters:
allowSymbols (bool)
- Return type:
None
- SetChosenFont(self, font)¶
Sets the font that will be returned to the user (for internal use only).
- Parameters:
font (wx.Font)
- Return type:
None
- SetColour(self, colour)¶
Sets the colour that will be used for the font foreground colour.
The default colour is black.
- Parameters:
colour (wx.Colour)
- Return type:
None
- SetInitialFont(self, font)¶
Sets the font that will be initially used by the font dialog.
- Parameters:
font (wx.Font)
- Return type:
None
- SetRange(self, min, max)¶
Sets the valid range for the font point size (Windows only).
The default is 0, 0 (unrestricted range).
- Parameters:
min (int)
max (int)
- Return type:
None
- SetShowHelp(self, showHelp)¶
Determines whether the Help button will be displayed in the font dialog (Windows only).
The default value is
False
.- Parameters:
showHelp (bool)
- Return type:
None
Properties¶
- AllowSymbols¶
See
GetAllowSymbols
andSetAllowSymbols
- ChosenFont¶
See
GetChosenFont
andSetChosenFont
- InitialFont¶
See
GetInitialFont
andSetInitialFont
- ShowHelp¶
See
GetShowHelp
andSetShowHelp