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

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.

主站蜘蛛池模板: 万年县| 尼勒克县| 江源县| 伊金霍洛旗| 克拉玛依市| 枝江市| 广宁县| 红原县| 甘泉县| 日照市| 武穴市| 华容县| 麻江县| 遂川县| 安泽县| 工布江达县| 惠东县| 杭锦后旗| 正安县| 兴海县| 湘潭县| 教育| 大石桥市| 余干县| 鄄城县| 寿光市| 永兴县| 梁平县| 津市市| 望城县| 虞城县| 武隆县| 吴堡县| 云霄县| 通化市| 基隆市| 汉源县| 武夷山市| 汪清县| 甘泉县| 教育|