By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
440,675 Members | 2,255 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 440,675 IT Pros & Developers. It's quick & easy.

Tkinter - resize tkMessageBox

P: n/a
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
Share this Question
Share on Google+
5 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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.