From: Joe English on
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
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