Phoenix Logo

phoenix_title wx.FontData

This class holds a variety of information related to font dialogs.


class_hierarchy Class Hierarchy

Inheritance diagram for class FontData:


method_summary Methods Summary

__init__ Constructor.
EnableEffects Enables or disables “effects” under Windows or generic only.
GetAllowSymbols Under Windows, returns a flag determining whether symbol fonts can be selected.
GetChosenFont Gets the font chosen by the user if the user pressed wx.OK ( wx.FontDialog.ShowModal returned wx.ID_OK).
GetColour Gets the colour associated with the font dialog.
GetEnableEffects Determines whether “effects” are enabled under Windows.
GetInitialFont Gets the font that will be initially used by the font dialog.
GetShowHelp Returns True if the Help button will be shown (Windows only).
SetAllowSymbols Under Windows, determines whether symbol fonts can be selected.
SetChosenFont Sets the font that will be returned to the user (for internal use only).
SetColour Sets the colour that will be used for the font foreground colour.
SetInitialFont Sets the font that will be initially used by the font dialog.
SetRange Sets the valid range for the font point size (Windows only).
SetShowHelp Determines whether the Help button will be displayed in the font dialog (Windows only).

api Class API



class wx.FontData(Object)

Possible constructors:

FontData()

This class holds a variety of information related to font dialogs.


Methods



__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.

Parameters: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.

Return type:bool


GetChosenFont(self)

Gets the font chosen by the user if the user pressed wx.OK ( wx.FontDialog.ShowModal returned wx.ID_OK).

Return type: wx.Font


GetColour(self)

Gets the colour associated with the font dialog.

The default value is black.

Return type: wx.Colour


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: wx.Font


GetShowHelp(self)

Returns True if the Help button will be shown (Windows only).

The default value is False.

Return type:bool


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) –


SetChosenFont(self, font)

Sets the font that will be returned to the user (for internal use only).

Parameters:font (wx.Font) –


SetColour(self, colour)

Sets the colour that will be used for the font foreground colour.

The default colour is black.

Parameters:colour (wx.Colour) –


SetInitialFont(self, font)

Sets the font that will be initially used by the font dialog.

Parameters: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).

Parameters:
  • 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.

Parameters:showHelp (bool) –

Properties



AllowSymbols

See GetAllowSymbols and SetAllowSymbols



ChosenFont

See GetChosenFont and SetChosenFont



Colour

See GetColour and SetColour



InitialFont

See GetInitialFont and SetInitialFont



ShowHelp

See GetShowHelp and SetShowHelp