Construct the dialog.
Construct the dialog.
Hide the dialog.
Check if the dialog is visible.
Remove a previously set command.
Set the callback to execute when a new font is choosen. When the callback is executed information about the choosen font is stored as a string in the CommandArgs.Dialog struct.
Show the dialog.
Get the dialog result. This varies on the type of dialog used and will reflect the overall result expected of each dialog.
Remove any leading or trailing braces.
Show the dialog.
auto dialog = new FontDialog("Select a font") .setCommand(delegate(CommandArgs args){ string font = args.dialog.font; }) .show();
Additional events that can also be bound to using the bind method.
<<TkFontchooserFontChanged>>, <<TkFontchooserVisibility>>,
Result: The result is empty as all interaction takes place via callbacks.
The font dialog allows users to choose a font installed on the system. It uses the native platform font selection dialog where available, or a dialog implemented in Tcl/Tk otherwise. Unlike most of the other dialogs, the fontchooser does not return an immediate result because on some platforms (Mac OSX) the standard font dialog is modeless while on others (Windows) it is modal. To accommodate this difference, all user interaction with the dialog will be communicated to the caller via commands or virtual events.