-
Book Overview & Buying
-
Table Of Contents
Tcl/Tk 8.5 Programming Cookbook
The tk_chooseDirectory command displays a dialog window that allows the end user to select a directory, as the name implies. The return value is the absolute directory path selected or an empty string (if the Cancel button is clicked).
The syntax is as follows:
tk_chooseDirectory option value …
The tk_chooseDirectory command accepts one or more option value pairs as detailed below. If no option value pairs are provided, the command will display the default values for the dialog.
|
Option |
Interpretation |
|---|---|
|
|
Sets the initial directory to display. If not set, the current working directory will be displayed. |
|
|
Specifies if the user may specify a non-existing directory. |
|
|
Specifies the parent of the dialog. The dialog is displayed on top of the parent. |
|
|
Sets the text to be displayed in the dialog title bar. |
In the following example, we will display a message box and assign...
Change the font size
Change margin width
Change background colour