I have tried creating a window of a known size, but this seems to be ignored
(the window is overwritten). I can resize the window displayed by
tk_dialog, but the text within it stays the same size.
All the man pages etc. seem to give the same description, and no hint about
the window that is actually used.
I'm not sure which version of TCL/TK I am using (different machine), but it
runs on Mandrake 7.0 with KDE.
Any help much appreciated.
Alan
Is there any way to specify the window size on tk_dialog? I am running
Linux Mandrake 7.0.
I have tried creating a window of the required size, but (as the manual
says) this is destroyed when the dialogue is displayed.
I can re-size the displayed window, but that has no effect on the text
itself.
The
window
generated
stretches
vertically
only
to
accommodate
the
text
which doesn't make it very readable.
Apart from the obvious, write my own version of tk_dialog, is there any way
to make the output format sensible?
Any help gratefully received.
Alan
The following code is from dialog.tcl. (notice the comments)
# 2. Fill the top part with bitmap and message (use the option
# database for -wraplength and -font so that they can be
# overridden by the caller).
option add *Dialog.msg.wrapLength 3i widgetDefault
if {![string compare $tcl_platform(platform) "macintosh"]} {
option add *Dialog.msg.font system widgetDefault
} else {
option add *Dialog.msg.font {Times 18} widgetDefault
}
So, you can override the width for a individual dialog :
option add *dlg.msg.wrapLength 8i interactive
tk_dialog .dlg "Dialog" "This is a dialog whose text is rather long but
should not wrap." info 0 Ok
or specify a global override for all dialogs :
option add *Dialog.msg.wrapLength 8i interactive
Note that the font can be specified in the same manner.
-odeen