471,338 Members | 1,133 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,338 software developers and data experts.

Tkinter - resize tkMessageBox

Hi,
Is there a way to resize the width of the "tkMessageBox.askyesno"
dialog box, so that the text does not wrap to the next line.
Thanks
Rahul

Jun 4 '07 #1
5 6745
On Monday 04 June 2007 16:29, ra********@yahoo.com
wrote:
Hi,
Is there a way to resize the width of the
"tkMessageBox.askyesno" dialog box, so that the
text does not wrap to the next line. Thanks
Rahul
I don't know of any.
It's a little more work but your better off using
Toplevel and/or frame, you have more control over
the window and its appearance.

jim-on-linux
http://www.inqvista.com
Jun 4 '07 #2
On 4 Jun, 21:29, rahulna...@yahoo.com wrote:
Is there a way to resize the width of the "tkMessageBox.askyesno"
dialog box, so that the text does not wrap to the next line.
You can use the Tk option database, either explicitly or from a file.
For example, to set the wrap length of all dialogs to 10 inches, try
this:

root = Tk()
root.option_add("*Dialog.msg.wrapLength", "10i")

Regards,

Glenn

Jun 5 '07 #3
In article <11**********************@q75g2000hsh.googlegroups .com>,
Glenn Hutchings <zo*****@googlemail.comwrote:
>On 4 Jun, 21:29, rahulna...@yahoo.com wrote:
>Is there a way to resize the width of the "tkMessageBox.askyesno"
dialog box, so that the text does not wrap to the next line.

You can use the Tk option database, either explicitly or from a file.
For example, to set the wrap length of all dialogs to 10 inches, try
this:

root = Tk()
root.option_add("*Dialog.msg.wrapLength", "10i")
Jun 5 '07 #4
In article <ma***************************************@python. org>,
jim-on-linux <in*****@verizon.netwrote:
>On Monday 04 June 2007 16:29, ra********@yahoo.com
wrote:
>Hi,
Is there a way to resize the width of the
"tkMessageBox.askyesno" dialog box, so that the
text does not wrap to the next line. Thanks
Rahul
I don't know of any.
It's a little more work but your better off using
Toplevel and/or frame, you have more control over
the window and its appearance.
Jun 5 '07 #5
In article <0v************@lairds.us>, I wondered:
>In article <11**********************@q75g2000hsh.googlegroups .com>,
Glenn Hutchings <zo*****@googlemail.comwrote:
>>On 4 Jun, 21:29, rahulna...@yahoo.com wrote:
>>Is there a way to resize the width of the "tkMessageBox.askyesno"
dialog box, so that the text does not wrap to the next line.

You can use the Tk option database, either explicitly or from a file.
For example, to set the wrap length of all dialogs to 10 inches, try
this:

root = Tk()
root.option_add("*Dialog.msg.wrapLength", "10i")
.
.
.
But that does *not* affect the MessageBoxes under MacOS and Windows, right?
I apologize for my coyness. I'll be explicit: current MessageBoxes
under MacOS and Windows (but NOT X11-based MessageBoxes, as with Linux)
do NOT respect Dialog options. Tkinter will presumably build in Tile
capabilities in the future; then the default appearances may change
again.
Jun 11 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Yann.K | last post: by
1 post views Thread by Ajay | last post: by
1 post views Thread by Club-B42 | last post: by
5 posts views Thread by max(01)* | last post: by
reply views Thread by Stewart Midwinter | last post: by
4 posts views Thread by jmdeschamps | last post: by
6 posts views Thread by marcoberi | last post: by
reply views Thread by rosydwin | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.