473,237 Members | 1,391 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,237 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 6898
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Yann.K | last post by:
Hello. Using Tkinter, i would create a widget which display a shell command return. This return is long, and i would display a real time display (like with the tail -f commande on Linux) I...
1
by: Ajay | last post by:
hi! my application consists of a GUI with a number of functions. One of these runs a server in a separate thread. the thread is started and given the function start_server to execute the...
1
by: Club-B42 | last post by:
when i start opt_newlogin.py directly it works fine(outputs '1 1 1 1'), but if i start it from options.py there is an error(outputs ''). ======== opt_newlogin.py ======== from config import *...
5
by: max(01)* | last post by:
hello. i wrote a very simple tkinter demo program that uses menus, buttons, labels, entries, frames and secondary toplevels. it is a python version of a java program made by a colleague. ...
0
by: Stewart Midwinter | last post by:
I have a Tkinter app running on cygwin. It includes a Test menu item that does nothing more than fetch a directory listing and display it in a Toplevel window (I'd use a tkMessageBox showinfo...
4
by: jmdeschamps | last post by:
why is the button sunken when called through a bind method, and not with the command attribute? Thank you! ## Cut'nPaste example from Tkinter import * import tkMessageBox class...
6
by: marcoberi | last post by:
Hi everybody. I have this code snippet that shows a window without a titlebar (using overrideredirect) and two buttons on it: one quits and the other one brings up a simple tkMessageBox. On...
0
by: dudeja.rajat | last post by:
Hi, I'm working on Windows Platform I'm facing some problem with the tkMessageBox. My code is as below: import tkMessageBox import Tix from Tkinter import * if len(installedLibPath) !=...
0
by: Guilherme Polo | last post by:
On Thu, Aug 28, 2008 at 10:29 AM, <dudeja.rajat@gmail.comwrote: It is good to post a short code sample that demonstrates the problem, but it has to run by itself at least. tkMessageBox...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: MeoLessi9 | last post by:
I have VirtualBox installed on Windows 11 and now I would like to install Kali on a virtual machine. However, on the official website, I see two options: "Installer images" and "Virtual machines"....
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

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.