如何更改ttk :: checkbutton和ttk :: radiobutton指标的大小

时间:2019-01-28 17:36:20

标签: tcl tk

我想更改结合蛤主题的ttk :: checkbutton指示器的大小。如果使用默认主题,则可以通过选项 indicatordiameter 更改大小,但这不适用于蛤lam主题。 ttk :: radiobutton也会发生相同的问题。

1 个答案:

答案 0 :(得分:1)

主题有不同的问题。

a)不同的主题使用不同的配置选项。

b)图形主题无法调整其图形元素的大小。

对于蛤主题,您将需要配置样式的-indicatorsize

% package require Tk
8.6.9
% ttk::style theme use clam
% ttk::radiobutton .a -text hello
.a
% pack .a
% ttk::style configure A.TRadiobutton -indicatorsize 20
% ttk::radiobutton .b -text hello -style A.TRadiobutton
.b
% pack .b
%