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

Events and callbacks – adding life to programs

Now that you have learned how to add widgets to a screen and position them where you want, let's turn our attention to the third component of GUI programming.

This addresses the question of how to make widgets functional.

Making widgets functional involves making them responsive to events such as the pressing of buttons, the pressing of keys on a keyboard, and mouse clicks. 

This requires associating callbacks with specific events. Callbacks are normally associated with specific widget events using command binding rules, which are discussed in the following section.

主站蜘蛛池模板: 佛坪县| 自贡市| 潞城市| 建德市| 贵德县| 日土县| 广宁县| 连城县| 碌曲县| 育儿| 苗栗市| 紫金县| 鸡西市| 镇坪县| 淅川县| 阳原县| 丰顺县| 那曲县| 开鲁县| 阳山县| 古浪县| 通化县| 常宁市| 马尔康县| 扶沟县| 梁山县| 宾阳县| 临泽县| 宜兰市| 华容县| 湾仔区| 彩票| 临颍县| 五常市| 金坛市| 武胜县| 佛学| 海淀区| 乐清市| 德庆县| 凤冈县|