Tcl Treeview:如何更改标题行的行高

Tcl Treeview:如何更改标题行的行高,tcl,tk,Tcl,Tk,我可以使用更改ttk::treeview的正常行的行高 ttk::style configure MyStyle.Treeview -rowheight 25 但此命令不会更改标题行的行高。我该怎么做呢?似乎有任何方法可以改变标题的高度 您最好创建一个自定义字体并配置treeview标题 使用它 “Heading”是treeview标题样式的名称 font create headingfont font configure headingfont -size 13 ttk::style con

我可以使用更改ttk::treeview的正常行的行高

ttk::style configure MyStyle.Treeview -rowheight 25

但此命令不会更改标题行的行高。我该怎么做呢?

似乎有任何方法可以改变标题的高度

您最好创建一个自定义字体并配置treeview标题 使用它

“Heading”是treeview标题样式的名称

font create headingfont
font configure headingfont -size 13
ttk::style configure Heading -font headingfont
编辑:根据Oliver Scholl的回答,您可以使用:

ttk::style configure Heading -padding {0 20}
这会将顶部/底部填充设置为20,将左侧/右侧填充设置为0

 -padding 20 ; # left/top/bottom/right all the same
 -padding {0 20} ; # left/right, top/bottom
 -padding {0 20 0 20} ; # left, top, right, bottom
解决办法是

ttk::style configure Treeview.Heading -padding "0 0 0 0"

填充选项是一个顺序为{左上右下}的列表

ttk::style configure Treeview.Heading -padding {0 0 0 0}