Home > Archive > Tcl > February 2007 > how to set the font size for the message text in the tk_messageBox
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
how to set the font size for the message text in the tk_messageBox
|
|
| Vaclav Snajdr 2007-02-23, 8:12 am |
| Hi,
I would to know if it is a way to do this?
--
Vaclav Snajdr
| |
| MartinLemburg@UGS 2007-02-23, 8:12 am |
| Hi Vaclav,
sorry to say, but there is no way to change the font size of the
message part of tk_messageBox.
The message dialog that popup, when using tk_messageBox, is a native
dialog.
On MS Windows this means, that a native WIN32 function is used to
create this message dialog.
And this WIN32 function does not allow to change the font style or
size, but only the alignment!
But the change of the alignment is not available in the Tk command
tk_messageBox!
Best regards,
Martin Lemburg
UGS - a Siemens Company - Transforming the Process of Innovation
On Feb 23, 1:01 pm, Vaclav Snajdr <snajdr.vac...@t-online.de> wrote:
> Hi,
> I would to know if it is a way to do this?
> --
> Vaclav Snajdr
| |
| Joachim Moskalewski 2007-02-23, 8:12 am |
| Vaclav Snajdr <snajdr.vaclav@t-online.de> schrieb:
[ subject ]
Try this:
option add *Font {helvetica 20 normal}
tk_messageBox -message {This should not be the default font.} \
-title {Font Test} -icon info -type ok -parent .
Note that this might set the default font for every widget you are
creating from here on. If that's unwanted you could set it afterwards to
a different font, delete such added options, or tell every widget its
font especially.
HTH,
:) Jo
| |
| Koen Danckaert 2007-02-23, 8:12 am |
| Joachim Moskalewski wrote:
> Vaclav Snajdr <snajdr.vaclav@t-online.de> schrieb:
>
> [ subject ]
>
> Try this:
>
> option add *Font {helvetica 20 normal}
> tk_messageBox -message {This should not be the default font.} \
> -title {Font Test} -icon info -type ok -parent .
>
> Note that this might set the default font for every widget you are
> creating from here on. If that's unwanted you could set it afterwards to
> a different font, delete such added options, or tell every widget its
> font especially.
Or use a more specific option:
option add *Dialog.msg.font {helvetica 20 normal}
-- Koen
| |
| MartinLemburg@UGS 2007-02-23, 8:12 am |
| Hello,
being on the MS platform, the tk_messageBox dialog can not be
manipulated in its style!
On UNIX ... perhabs it is, because there a tcl sided dialog will be
used by tk_messageBox.
But perhabs it is possible to switch between the native and the tcl
sided dialogs on the MS platform?
Best regards,
Martin Lemburg
UGS - a Siemens Company - Transforming the Process of Innovation
On Feb 23, 2:44 pm, Koen Danckaert <danck...@retarget.com> wrote:
> Joachim Moskalewski wrote:
>
>
>
>
>
> Or use a more specific option:
>
> option add *Dialog.msg.font {helvetica 20 normal}
>
> -- Koen
| |
| suchenwi 2007-02-23, 7:14 pm |
| http://wiki.tcl.tk/tk_messageBox at the end shows a timed-out
messageBox using a tk_dialog. With an [after] before bringing up the
dialog, you can modify the font:
after 1 {.d.msg config -font {Arial 12 italic}}
tk_dialog .d Title "This is the main message" info 0 OK
Tricky, though - programming for the future :^)
| |
| Gerald W. Lester 2007-02-23, 7:14 pm |
| MartinLemburg@UGS wrote:
> Hello,
>
> being on the MS platform, the tk_messageBox dialog can not be
> manipulated in its style!
>
> On UNIX ... perhabs it is, because there a tcl sided dialog will be
> used by tk_messageBox.
>
> But perhabs it is possible to switch between the native and the tcl
> sided dialogs on the MS platform?
Sure is, just call tk::MessageBox instead of tk_messageBox.
BTW, one can often find the answers to such questions by looking at the .tcl
files installed with tcl/tk.
>
> Best regards,
>
> Martin Lemburg
> UGS - a Siemens Company - Transforming the Process of Innovation
>
> On Feb 23, 2:44 pm, Koen Danckaert <danck...@retarget.com> wrote:
>
>
--
+--------------------------------+---------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
|
|
|
|
|