Prev: Is there a reason that ActiveTcl does not have an 64bit distribution?
Next: Announcing: Password Gorilla 1.5.3.1
From: Joe English on 15 Jul 2010 13:53 Zbigniew Diaczyszyn asked: > 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? > > Googling around for a solution I found the following note (Mon, 28 Apr > 2008): > >> ttk::treeview item height >> is essentially hardcoded: there's (currently) no (convenient) way >> to change it for individual items, or even for the widget as a whole. >> --Joe English > > Is this still the actual state? Not completely. The "-rowheight" and "-indent" widget style options are available: ttk::style configure Treeview -rowheight $H -indent $I (defaults are: -rowheight 20, -indent 20). -rowheight applies to every item in the tree; there's still no way to specify different heights for specific items. --JE
From: Joe English on 15 Jul 2010 13:59
Emiliano wrote: > 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. That is correct -- it is undocumented, therefore subject to change without notice, usual disclaimers apply, etc., etc., ... However I'd give "-rowheight" a high probability of indefinite support, so it's safe to use. --JE |