This class holds a variety of information related to font dialogs.
See also
FontDialog Overview, wx.Font, wx.FontDialog
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). |
See |
|
See |
|
See |
|
See |
wx.
FontData
(Object)¶Possible constructors:
FontData()
This class holds a variety of information related to font dialogs.
__init__
(self)¶Constructor.
Initializes fontColour to black, showHelp to False
, allowSymbols to True
, enableEffects to True
, minSize to 0 and maxSize to 0.
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
.
enable (bool) –
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
.
bool
GetChosenFont
(self)¶Gets the font chosen by the user if the user pressed wx.OK
( wx.FontDialog.ShowModal
returned wx.ID_OK
).
GetColour
(self)¶Gets the colour associated with the font dialog.
The default value is black.
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
.
bool
GetInitialFont
(self)¶Gets the font that will be initially used by the font dialog.
This should have previously been set by the application.
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
.
int
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.
New 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
.
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
.
flags (int) –
New 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
.
allowSymbols (bool) –
SetChosenFont
(self, font)¶Sets the font that will be returned to the user (for internal use only).
font (wx.Font) –
SetColour
(self, colour)¶Sets the colour that will be used for the font foreground colour.
The default colour is black.
colour (wx.Colour) –
SetInitialFont
(self, font)¶Sets the font that will be initially used by the font dialog.
font (wx.Font) –
SetRange
(self, min, max)¶Sets the valid range for the font point size (Windows only).
The default is 0, 0 (unrestricted range).
min (int) –
max (int) –
SetShowHelp
(self, showHelp)¶Determines whether the Help button will be displayed in the font dialog (Windows only).
The default value is False
.
showHelp (bool) –
AllowSymbols
¶See GetAllowSymbols
and SetAllowSymbols
ChosenFont
¶See GetChosenFont
and SetChosenFont
InitialFont
¶See GetInitialFont
and SetInitialFont
ShowHelp
¶See GetShowHelp
and SetShowHelp