Parameters like width, align, justify won't work in Tkinter Message
<p>I'm trying to change the width of a Message widget in Tkinter by using the width parameter. I couldn't get it to work so I tried align, justify and aspect which all produced the same result - the box remains centred and the width of the text.</p>

<p>Here is my code:</p>

<pre><code>console_Fetch = Message(text="test\ntest\ntest\ntest\ntest",bd=1,relief="sunken",width=300)
console_Fetch.grid(row=7,column=0,padx=5,pady=1,columnspan=2)  
</code></pre>

<p>I'm obviously using .grid() to pack it into the window.</p>

<p>Here's a screenshot of my window:
<a href="http://i.stack.imgur.com/lgLoV.png" rel="nofollow"><img src="http://i.stack.imgur.com/lgLoV.png" alt="enter image description here"></a></p>

<h3>Pragmatic answer</h3>

<p>Often setting <code>width</code> in widgets is not working as expected, depending on priority of other aspects, cell width, you name it. It gets easily overruled, or depends on other conditions.</p>

<p>What I always do is give the grid a "skeleton" of canvases in adjecent cells, with height (or width) of zero. Subsequently stretch the widget with <code>sticky</code> inside their cells. Just look at the example below:</p>

<p><a href="http://i.stack.imgur.com/LP3lX.png" rel="nofollow"><img src="http://i.stack.imgur.com/LP3lX.png" alt="enter image description here"></a></p>

<pre><code>from tkinter import *
win = Tk()

console_Fetch = Message(text="test\ntest\ntest\ntest\ntest",bd=1,relief="sunken",width=3000)
canvas = Canvas(width = 500, height = 0)
canvas.grid(row=0,column=0)
console_Fetch.grid(row=1,column=0,padx=5,pady=1,columnspan=2, sticky = N+W+E+S)

win.mainloop()
</code></pre>

<p>The same I did in shaping the grid in the minesweeper- matrix in <a href="http://stackoverflow.com/a/39449125/1391444">this answer</a>.</p>

python tkinter