[Tkinter-discuss] class_ attribute on ttk widgets

Alejandro Autalan alejandroautalan at gmail.com
Sun Mar 31 08:58:53 CEST 2013


Hello all.

I'm reading the tkinter reference at
http://infohost.nmt.edu/tcc/help/pubs/tkinter/web/index.html.

It says that the 'class_' attribute is available for ttk widgets.  But when
is set, some widgets become  unresponsive.

Example:

#uname -a   Linux vostro1 3.2.0-4-amd64 #1 SMP Debian 3.2.39-2 x86_64
GNU/Linux
# Python 3.2.3
#tkinter.TkVersion 8.5

import tkinter as tk
from tkinter import ttk

f = ttk.Frame()
f.grid()
entry = ttk.Entry(f, class_='CustomEntry')
entry.grid()
btn = ttk.Button(f, class_='CustomButton', text='Button')
btn.grid()
f.mainloop()

When I run the example, I can't enter text on entry widget or click a
button.
Is this the expected behaviour? Anyone know how this attribute should be
used for ttk widgets ?

Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20130331/369e65d8/attachment.html>


More information about the Tkinter-discuss mailing list