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

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.

主站蜘蛛池模板: 南皮县| 黄梅县| 临沭县| 囊谦县| 龙川县| 汝南县| 南澳县| 昌都县| 桐城市| 鹤山市| 苏尼特右旗| 贵州省| 安新县| 宿迁市| 监利县| 庆安县| 宜黄县| 邹城市| 紫金县| 唐河县| 东山县| 巩义市| 淳安县| 鄯善县| 永年县| 岚皋县| 桂阳县| 习水县| 南岸区| 新邵县| 扎鲁特旗| 德保县| 天全县| 湄潭县| 永吉县| 永泰县| 延吉市| 中阳县| 广河县| 华坪县| 额济纳旗|