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

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.

主站蜘蛛池模板: 天全县| 从化市| 石柱| 綦江县| 新和县| 舒城县| 大石桥市| 泌阳县| 增城市| 武义县| 丰镇市| 丰原市| 唐山市| 平利县| 武城县| 万荣县| 谢通门县| 永州市| 林西县| 江达县| 岗巴县| 合肥市| 渭南市| 承德市| 祥云县| 农安县| 武城县| 揭东县| 麻城市| 扎囊县| 兰州市| 科技| 云和县| 长泰县| 焦作市| 宜春市| 云南省| 武清区| 丰宁| 大同市| 沛县|