I want to create information dialogue with tkMessagebox with a fixed width. I didn't see any options in the tkMessagebox.showinfo function that can handle this. Is there any way? Thanks!
相关问题
- how to define constructor for Python's new Nam
- streaming md5sum of contents of a large remote tar
- How to get the background from multiple images by
- Evil ctypes hack in python
- Correctly parse PDF paragraphs with Python
As far as I'm aware you can't resize the tkMessageBox, but if you're willing to put in the effort you can create custom dialogs.
This little script demonstrates it:
When you run the script you should see a master window appear, with two buttons, upon pressing one of the buttons you'll create a
TopLevel
window which can be resized as is shown in the script designated by#Here
. These top level windows act just like standard windows and can be resized and have child widgets. Also if you're trying to pack or grid child widgets into theTopLevel
window then you'll need to use.geometry
not-width
or-height
, this would go something like this:Hope I helped, try reading up on the
TopLevel
widget here: http://effbot.org/tkinterbook/toplevel.htm