[Tkinter-discuss] Strange 'tate' option in ttk.Treeview.heading

Alejandro Autalan alejandroautalan at gmail.com
Thu Apr 11 12:28:41 CEST 2013

I'm getting an strange 'tate'  property when calling treeview.heading()

Here is an example:

import sys
import tkinter as tk
import tkinter.ttk as ttk

print('Python version:', sys.version_info)
print('tk version:', tk.TkVersion)
print('ttk version:', ttk.__version__)

root = tk.Tk()
columns = ('A', 'B', 'C')
tv = ttk.Treeview(root, columns=columns )
for col in columns:
    tv.heading(col, text=col)
tv.heading('#0', text='Root')

#get heading properties
properties= tv.heading('A')
# Print strangeous 'tate' property
print("strange 'tate' option", properties)
properties['anchor'] = tk.E

#error trying to set properties
tv.heading('A', **properties)



This is the output:

Python version: sys.version_info(major=3, minor=3, micro=1,
releaselevel='final', serial=0)
tk version: 8.5
ttk version: 0.3.1
strangeous 'tate' property {'image': '', 'anchor': 'center', 'tate': '',
'command': '', 'text': 'A'}
Traceback (most recent call last):
  File "../tkinter/tate-issue.py", line 24, in <module>
    tv.heading('A', **properties)
  File "/usr/lib/python3.3/tkinter/ttk.py", line 1268, in heading
    return _val_or_dict(kw, self.tk.call, self._w, 'heading', column)
  File "/usr/lib/python3.3/tkinter/ttk.py", line 311, in _val_or_dict
    res = func(*(args + options))
_tkinter.TclError: unknown option "-tate"

Where this option comes from?
Can someone try on another python version? Maybe this is a Bug?

Alejandro A
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/tkinter-discuss/attachments/20130411/cdd2f1ee/attachment.html>

More information about the Tkinter-discuss mailing list