[New-bugs-announce] [issue32864] Visual glitches when animating ScrolledText instances using place geometry manager
Victor Domingos
report at bugs.python.org
Sat Feb 17 09:05:42 EST 2018
New submission from Victor Domingos <editor.arcosonline at gmail.com>:
In the current Python 3.7.0b1, on macOS 10.12.6 Sierra (also on 10.11 El Capitan), which seems to include a newer Tcl/tk version, there seems to be some visual glitches when using the place() geometry manager to animate a ttk.Frame containing ScrolledText widgets. These issues do not happen when running the same code on current Python 3.6.
Thanks in advance,
With best regards,
Victor Domingos
My current version:
Python 3.7.0b1 (v3.7.0b1:9561d7f501, Jan 30 2018, 19:10:11)
[Clang 6.0 (clang-600.0.57)] on darwin
--------
Here is an excerpt of my code (animated placement of the container frame):
def show_entryform(self, *event):
if not self.is_entryform_visible:
self.is_entryform_visible = True
self.btn_add.configure(state="disabled")
# Formulário de entrada de dados (fundo da janela)
self.my_statusbar.lift()
if SLOW_MACHINE:
self.entryframe.place(
in_=self.my_statusbar, relx=1, y=0, anchor="se", relwidth=1, bordermode="outside")
else:
for y in range(-30, -12, 6):
self.entryframe.update()
y = y**2
self.entryframe.place(
in_=self.my_statusbar, relx=1, y=y, anchor="se", relwidth=1, bordermode="outside")
for y in range(-12, -3, 3):
self.entryframe.update()
y = y**2
self.entryframe.place(
in_=self.my_statusbar, relx=1, y=y, anchor="se", relwidth=1, bordermode="outside")
for y in range(-3, 0, 1):
self.entryframe.update()
y = y**2
self.entryframe.place(
in_=self.my_statusbar, relx=1, y=y, anchor="se", relwidth=1, bordermode="outside")
self.entryframe.lift()
-----------
And the base class definition for the problematic widgets:
class LabelText(ttk.Frame):
"""
Generate an empty tkinter.scrolledtext form field with a text label above it.
"""
def __init__(self, parent, label, style=None, width=0, height=0):
ttk.Frame.__init__(self, parent)
if style:
self.label = ttk.Label(self, text=label, style=style, anchor="w")
else:
self.label = ttk.Label(self, text=label, anchor="w")
self.scrolledtext = ScrolledText(self, font=("Helvetica-Neue", 12),
highlightcolor="LightSteelBlue2",
wrap='word',
width=width,
height=height)
self.label.pack(side="top", fill="x", expand=False)
self.scrolledtext.pack(side="top", fill="both", expand=True)
----------
components: Tkinter, macOS
files: issues.jpg
messages: 312281
nosy: Victor Domingos, gpolo, ned.deily, ronaldoussoren, serhiy.storchaka
priority: normal
severity: normal
status: open
title: Visual glitches when animating ScrolledText instances using place geometry manager
type: behavior
versions: Python 3.7, Python 3.8
Added file: https://bugs.python.org/file47450/issues.jpg
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32864>
_______________________________________
More information about the New-bugs-announce
mailing list