You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
from ttkwidgets.font import askfont def font(): self.res = askfont() if self.res[0] is not None: self.label.configure(font=self.res[0]) print('««««««««', self.res[0]) # return self.label = ttk.Label(self, text='Texto de exemplo.') self.label.pack(padx=10, pady=10) self.botao_fonte = ttk.Button(self, text="Escolher a fonte e tamanho da letra", command=font) self.botao_fonte.pack()
and if I select the size and then the type font, then it works. But if I select first the type and then the font size it don't.
Thanks.
The text was updated successfully, but these errors were encountered:
i can also confirm this. I tried to debug this issue but had no success. What i found while debugging is when ever on_size function is triggered, after its first execution, it again triggers on_family function. So on first execution it works perfectly preserving the font value, but in the secound execution it changes font to None. No idea how and why its been triggered.
This code is inside a window class:
from ttkwidgets.font import askfont
def font():
self.res = askfont()
if self.res[0] is not None:
self.label.configure(font=self.res[0])
print('««««««««', self.res[0])
# return
self.label = ttk.Label(self, text='Texto de exemplo.')
self.label.pack(padx=10, pady=10)
self.botao_fonte = ttk.Button(self, text="Escolher a fonte e tamanho da letra", command=font)
self.botao_fonte.pack()
and if I select the size and then the type font, then it works. But if I select first the type and then the font size it don't.
Thanks.
The text was updated successfully, but these errors were encountered: