wx.FontData

Inheritance diagram for wx.FontData:



Class API

Methods

__init__()

This class holds a variety of information related to font dialogs and is used to transfer settings to and results from a wx.FontDialog .

Initializes fontColour to black, showHelp to False, allowSymbols to True, enableEffects to True, minSize to 0 and maxSize to 0.


Returns:

wx.FontData


EnableEffects(enable)

Enables or disables ‘effects’ under MS 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()

Under MS Windows, returns a flag determining whether symbol fonts can be selected. Has no effect on other platforms.

The default value is True.


Returns:

bool


GetChosenFont()

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


Returns:

wx.Font


GetColour()

Gets the colour associated with the font dialog.

The default value is black.


Returns:

wx.Colour


GetEnableEffects()

Determines whether ‘effects’ are enabled under Windows. This refers to the controls for manipulating colour, strikeout and underline properties.

The default value is True.


Returns:

bool


GetInitialFont()

Gets the font that will be initially used by the font dialog. This should have previously been set by the application.


Returns:

wx.Font


GetShowHelp()

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

The default value is False.


Returns:

bool


SetAllowSymbols(allowSymbols)

Under MS Windows, determines whether symbol fonts can be selected. Has no effect on other platforms.

The default value is True.

Parameters:

  • allowSymbols (bool)

SetChosenFont(font)

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

Parameters:


SetColour(colour)

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

The default colour is black.

Parameters:


SetInitialFont(font)

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

Parameters:


SetRange(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(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