Home     |     .Net Programming    |     cSharp Home    |     Sql Server Home    |     Javascript / Client Side Development     |     Ajax Programming

Ruby on Rails Development     |     Perl Programming     |     C Programming Language     |     C++ Programming     |     IT Jobs

Python Programming Language     |     Laptop Suggestions?    |     TCL Scripting     |     Fortran Programming     |     Scheme Programming Language


 
 
Cervo Technologies
The Right Source to Outsource

MS Dynamics CRM 3.0

Python Programming Language

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
On Monday 04 June 2007 16:29, rahulna@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

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

In article <1181026856.261957.207@q75g2000hsh.googlegroups.com>,
Glenn Hutchings  <zond@googlemail.com> wrote:
>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?
In article <mailman.8693.1180993370.32031.python-l@python.org>,
jim-on-linux  <inq1@verizon.net> wrote:
>On Monday 04 June 2007 16:29, rahulna@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.

                        .
                        .
                        .
Yes and no.  Yes, synthesizing ones own MessageBox gives greater
control, but that becomes a non-"native" MessageBox which is
alleged to discomfort some end-users.

'Nother way to say this:  tkMessageBox is implemented in terms of
native widgets, as much as possible, and native MessageBoxes on
at least some platforms do NOT provide for resizing or width
control.

Add to del.icio.us | Digg this | Stumble it | Powered by Megasolutions Inc