Tkinter - resize tkMessageBox
Cameron Laird
claird at lairds.us
Mon Jun 11 11:52:09 EDT 2007
In article <0v0hj4-pip.ln1 at lairds.us>, I wondered:
>In article <1181026856.261957.207570 at q75g2000hsh.googlegroups.com>,
>Glenn Hutchings <zondo42 at googlemail.com> wrote:
>>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")
> .
> .
> .
>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.
More information about the Python-list
mailing list