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

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.

主站蜘蛛池模板: 民勤县| 镇原县| 灌云县| 上杭县| 青阳县| 武鸣县| 游戏| 石屏县| 鹤壁市| 新巴尔虎左旗| 河曲县| 奉节县| 东乡| 丹江口市| 朔州市| 武鸣县| 隆德县| 仪征市| 罗定市| 马关县| 宜兰市| 巩留县| 万安县| 贵州省| 安康市| 旅游| 巴林左旗| 应城市| 周至县| 张家川| 罗城| 庆安县| 穆棱市| 五河县| 尚义县| 新宾| 靖远县| 新干县| 凤阳县| 牙克石市| 嘉义市|