Expand description
Dialogs - various built-in dialogs.
All of the dialogs (apart from the font chooser) are built using a
“builder” style. The named function creates a relevant struct value,
and then functions on the relevant TkWIDGET struct alter the
default values in that struct, until finally calling show
will set up and display the dialog.
There is only one font chooser dialog instance, and commands are provided to interact with it directly.
Message boxes
- also see the Tk manual
The message-box is used to set up a simple alert, confirmation or information dialog:
ⓘ
rstk::message_box()
.OPTION(VALUE) // 0 or more
.show();
message_box
is called first, to get the TkMessageBox instance.show
must be called last, to set up and display the dialog.- zero or more options are added to the message box.
Chooser dialogs
For colours, directories, files and fonts!
Each dialog returns an Option type, with value None if cancelled.
Tk manual pages:
- chooseColor
- chooseDirectory
- getOpenFile (and getSaveFile)
- fontchooser
Structs
- Refers to the settings for TkColourChooser.
- Refers to the settings for TkDirectoryChooser.
- Refers to the settings for TkMessageBox.
- Refers to the settings for TkOpenFileChooser.
- Refers to the settings for TkSaveFileChooser.
Functions
- Creates a colour-chooser to complete in builder style.
- Creates a directory-chooser to complete in builder style.
- Set the command to be called when a font is chosen.
- Get the font for the font-chooser.
- Set the font for the font-chooser.
- Hide the font-chooser, making it not visible.
- Set the parent widget for the font-chooser.
- Show the font-chooser, making it visible.
- Set the title for the font-chooser.
- Check if the font-chooser is currently visible.
- Creates a message box to complete in builder style.
- Creates an open-file dialog to complete in builder style.
- Creates a save-file dialog to complete in builder style.