From: Roger P. [email protected]
Subject: better looking directory chooser for tk?
Date: Fri, 9 Oct 2009 22:20:58 +0900
Message-ID: [email protected]
Currently in windows with Tk
if I run
it gives me the cruddy “teeny windows” version that forces you to start
at my computer to navigate through, and the window can’t be expanded,
Please see the section “Standard Dialogs” on
http://www.tkdocs.com/tutorial/windows.html (at TkDocs site).
The dialog is a standard one on a Windows version of Tk.
To give an initial directory, please use ‘initialdir’ option
Its full option is:
Please read the Tcl/Tk’s man page of “tk_chooseDirectory” about
the option values.
Anybody know how I can get a better looking directory chooser? I know
it’s possible, since other programs have the normal ones.
If you hate the standard dialogs, you must create your own dialogs.
However, if the “other programs” which you said are written in Tcl/Tk
(Tcl/Tk script only, or with some Tcl/Tk extensions which work on your
environment), you can load and use them on Ruby/Tk.
For example, the standard “tk_chooseDirectory” dialog on Unix (Linux)
is written in pure Tcl/Tk (see /choosedir.tcl).
So, you can use it on Windows.
The following replaces Tk.chooseDirectory method to the Unix version.