Tkinter - resize tkMessageBox

Glenn Hutchings zondo42 at googlemail.com
Tue Jun 5 03:00:56 EDT 2007


On 4 Jun, 21:29, rahulna... at 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




More information about the Python-list mailing list