]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
SF patch #491183 (Jeff Epler): ScrolledText.grid() doesn't work
authorGuido van Rossum <guido@python.org>
Mon, 10 Dec 2001 16:42:43 +0000 (16:42 +0000)
committerGuido van Rossum <guido@python.org>
Mon, 10 Dec 2001 16:42:43 +0000 (16:42 +0000)
commit61d3637ff8616d3e231a20f8f0da3237e27ca40c
tree0d7032f8e1eca5ebd94c3f6ff561aa7bca46e6ff
parentfb173cd471e842dc37f01e767dd1fe0a9a5f7d4e
SF patch #491183 (Jeff Epler): ScrolledText.grid() doesn't work

Using grid methods on ScrolledText widgets does not
work as expected. It either fails to pack a widget, or
can even cause Tk to lock up.

The problem is that the .grid method is being called on
the text widget, not the frame widget. This can lead
to the well-known lockup in Tk when a frame's children
are managed by both the pack and grid managers. Even
if it doesn't lock up, the frame is never placed within
the intended widget.

Program fragment:
>>> import ScrolledText
>>> s = ScrolledText.ScrolledText()
>>> s.grid(row=0, column=0, rowspan=2)

The following patch uses the same hack to copy the
'grid' and 'place' geometry manager methods to the
ScrolledText instance as is already used for the 'pack'
manager.
Lib/lib-tk/ScrolledText.py