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

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.

主站蜘蛛池模板: 山阳县| 延边| 青铜峡市| 巩义市| 阆中市| 忻城县| 焦作市| 满洲里市| 讷河市| 城口县| 麦盖提县| 苍山县| 巴马| 绥芬河市| 阿拉善盟| 大英县| 江源县| 宜春市| 北京市| 乌拉特后旗| 共和县| 崇礼县| 徐汇区| 白城市| 双辽市| 巴彦县| 岚皋县| 达日县| 开远市| 呼伦贝尔市| 兰溪市| 藁城市| 思茅市| 图木舒克市| 松桃| 湟源县| 海兴县| 武夷山市| 永胜县| 迭部县| 河北省|