public class FontDialog extends Dialog:
Themed dialog that selects a font installed on the operating system.
Every visible family row is painted with that family, while the preview pane reflects the selected size, bold state and italic state. Use FontLightBox when the chooser must remain embedded in an existing application window.
dialog = FontDialog(Font("DejaVu Sans", 16))
if dialog.showDialog(window):
label.font = dialog.selectedFont| Modifier and Type | Member | Description |
|---|---|---|
| public property | previewTextpreviewText as String: |
Text rendered in the large preview area. |
| public readonly property | selectedFontselectedFont as Font: |
Font accepted by the user, or the initial font after cancellation. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | FontDialogFontDialog(selectedFont as Font = null, title as String = "Select font"): |
Creates a font-selection dialog. |
| Modifier and Type | Member | Description |
|---|---|---|
| public | showDialog | Displays the dialog and blocks until the user accepts or cancels it. |