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

GUI programming – the big picture

As a GUI programmer, you will generally be responsible for deciding the following three aspects of your program:

  • Which components should appear on the screen? This involves choosing the components that make the user interface. Typical components include things such as buttons, entry fields, checkboxes, radio buttons, scroll bars, and the like. In Tkinter, the components that you add to your GUI are called widgets. Widgets (short for window gadgets) are the graphical components that make up your application's frontend.
  • Where should the components go? This includes deciding the position and the structural layout of various components. In Tkinter, this is referred to as geometry management.
  • How do components interact and behave? This involves adding functionality to each component. Each component or widget does some work. For example, a button, when clicked on, does something in response. A scrollbar handles scrolling, and checkboxes and radio buttons enable users to make some choices. In Tkinter, the functionality of various widgets is managed by the command binding or the event binding using callback functions.

The following figure shows the three components of GUI programming:

Let's delve deeper into each of these three components in the context of Tkinter.

主站蜘蛛池模板: 托克托县| 琼海市| 常德市| 论坛| 海门市| 潢川县| 成武县| 潮州市| 大埔县| 孟州市| 伊春市| 白城市| 融水| 若尔盖县| 崇阳县| 如皋市| 六枝特区| 红河县| 乐平市| 太原市| 九龙县| 海安县| 江津市| 宁城县| 巴塘县| 乳源| 西林县| 宜章县| 左贡县| 墨竹工卡县| 长阳| 宿迁市| 凤翔县| 克东县| 寿宁县| 横峰县| 永寿县| 阿图什市| 桂阳县| 乐陵市| 金堂县|