Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

tk_dialog window size

90 views
Skip to first unread message

Alan Pettigrew

unread,
Jun 30, 2000, 3:00:00 AM6/30/00
to
Is it possible to change the size of window used by tk_dialog?

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

Alan Pettigrew

unread,
Jul 3, 2000, 3:00:00 AM7/3/00
to
Apologies if this is a repeat posting. The original didn't appear on the
newsgroup.

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

Odeen

unread,
Jul 4, 2000, 3:00:00 AM7/4/00
to
"Alan Pettigrew" <alan.pe...@fox-europe.com> wrote :

>
> Is there any way to specify the window size on tk_dialog?
>

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


0 new messages