wxFontPickerCtrl
This control allows the user to select a font. The generic implementation is a
button which brings up a wxFontDialog when clicked. Native implementation may
differ but this is usually a (small) widget which give access to the
font-chooser dialog.
Creation Parameters
- atom parent
- integer id [=-1]
- sequence date_time [=wxDefaultDateTime]
- integer x [=-1]
- integer y [=-1]
- integer cx [=-1]
- integer cy [=-1]
- integer style [=wxCLRP_DEFAULT_STYLE]
- wxFNTP_DEFAULT_STYLE The default style: wxFNTP_FONTDESC_AS_LABEL | wxFNTP_USEFONT_FOR_LABEL.
- wxFNTP_USE_TEXTCTRL Creates a text control to the left of the picker button which is completely managed by the wxFontPickerCtrl and which can be used by the user to specify a font (see SetSelectedFont). The text control is automatically synchronized with button's value. Use functions defined in wxPickerBase to modify the text control.
- wxFNTP_FONTDESC_AS_LABEL Keeps the label of the button updated with the fontface name and the font size. E.g. choosing "Times New Roman bold, italic with size 10" from the fontdialog, will update the label (overwriting any previous label) with the "Times New Roman, 10" text.
- wxFNTP_USEFONT_FOR_LABEL Uses the currently selected font to draw the label of the button.
You can use wxEVT_COMMAND_FONTPICKER_CHANGED along with get_fontpicker_event_font.
Functions/Procedures
Supertopics
Subtopics
wxFontPickerCtrl
Category:
wxFontPickerCtrl
Returns the currently selected font.
wxFontPickerCtrl
Category:
wxFontPickerCtrl
Returns the maximum point size value allowed for the user-chosen font.
wxFontPickerCtrl
Category:
wxFontPickerCtrl
Sets the currently selected font.
wxFontPickerCtrl
Category:
wxFontPickerCtrl
Sets the maximum point size value allowed for the user-chosen font. The default
value is 100. Note that big fonts can require a lot of memory and CPU time both
for creation and for rendering; thus, specially because the user has the option
to specify the fontsize through a text control (see wxFNTP_USE_TEXTCTRL), it's a
good idea to put a limit to the maximum font size when huge fonts do not make
much sense.