官术网_书友最值得收藏!

Doing it in style

So far, we have relied on Tkinter to provide specific platform-based styling for our widgets. However, you can specify your own styling of widgets, such as their color, font size, border width, and relief. A brief introduction to styling features that are available in Tkinter is supplied in the following section.

You may recall that we can specify widget options at the time of its instantiation, as follows:

my_button = tk.Button(parent, **configuration options)

Alternatively, you can specify the widget options by using configure() in the following way:

my_button.configure(**options)

Styling options are also specified as options to the widgets either at the time of creating the widgets, or later by using the configure option.

主站蜘蛛池模板: 仁怀市| 芜湖县| 格尔木市| 沁源县| 沽源县| 鄂伦春自治旗| 晋宁县| 康乐县| 本溪| 阿瓦提县| 永靖县| 清镇市| 金堂县| 什邡市| 岑溪市| 筠连县| 浦县| 耿马| 荣昌县| 锡林郭勒盟| 宿松县| 六枝特区| 常熟市| 台北县| 寿光市| 三江| 宜阳县| 瑞丽市| 巴林右旗| 彭泽县| 张掖市| 江西省| 贵定县| 大埔区| 洛隆县| 库车县| 安图县| 弋阳县| 射阳县| 高要市| 清镇市|