Форум сайта python.su
Что-то я опять уперся в стену и вынужден просить помощи у зала.
Код полностью выкладывать не буду, там много, да и смысла в этом нет. Самый обычный Treeview, элементы в него добавляются в цикле не менее банальной строкой:
tree.insert('', 'end', text=str(count), values=raw, tag='item')
tree.tag_configure('item', font=('Verdana', font_size))
Офлайн
Сдается мне, никто не пользуется Treeview от ttk
Оставлю для потомства. Нашел тут. :
Zbigniew Diaczyszyn ha escrito:
> If the font is very large (e.g. 16 points) the tree content is not
> fitting into the rows. Can the height of the rows for the whole widget
> be changed?
This should do the trick (change the row height for the whole
widget):
set height 40
ttk::style configure Custom.Treeview -rowheight $height
$tree configure -style Custom.Treeview
Note that this option is undocumented, and it could go away
without notice, or the api changed, etc.
Regards
Emiliano
Style().configure('Treeview', rowheight=40)
Отредактировано Ryoga (Сен. 27, 2014 12:32:50)
Офлайн
Ага. Когда я начинал использовать Tkinter, то я написал свой класс, который реализует практически тот-же функционал и даже чуть-чуть больше.
Офлайн