Cerca

Heus ací els resultats de la cerca.

Python Professional Course Series: GUI Programming
188 Resultats, Darrera modificació:
= Python Professional Course Series: GUI Programming == What is GUI? GUI is an acronym. Moreover, it’s a three-letter acronym, a representative of a well-known class of acronyms which pl
1.6 Events and how to handle them
187 Resultats, Darrera modificació:
ow, events are the fuel which propel the application’s movements. All events come **to the event manager**, which is responsible for dispatching them to all the application components. This also means that some of the events may launch some of your callbacks, which makes yo
1.3 Settling widgets in the window's interior
181 Resultats, Darrera modificació:
== Settling widgets A familiarity with the ''Button'' widget allows us to show you some ways of putting the widgets (not only the buttons) inside windows. There are more of them than just ''place()'', which you learned about in the previous section. To be precise, there are **three different metho
1.2 Let TkInter speak!
173 Resultats, Darrera modificació:
= Importing TkInter As you already know, from Python's point of view TkInter is a package named **tkinter**. The package contains a bunch of functions, constants, classes, objects, and modules used to build GUI applications. The GUI application itsel
1.7 Visiting widgets’ properties
155 Resultats, Darrera modificació:
can access its properties by using the dot notation. You have to use one of two possible ways of reading and setting widget properties’ values. The first method is based on using a **dictionary** which exists inside every widget. Assuming that a widget named ''Widge''t has
2.4 Shaping the main window and conversing with the user
141 Resultats, Darrera modificació:
= 2.4 Shaping the main window and conversing with the user The main window is a very specific construct, as its fate is shared among **two** masters: **you** (supported by tkinter) and your **operati... ultly set to ''Tk'', no matter what your application is named, or even if it's unnamed. To change the
1.5 A simple GUI application
136 Resultats, Darrera modificació:
= 1.5 A simple GUI application == Building a GUI application from scratch Now we're going to build a very simple and rather useless GUI application. Does that sound weird? Maybe, but the application, when ready, will make you more accustomed to some
2.5 Working with the Canvas
107 Resultats, Darrera modificació:
ets. Please treat this story as a basic introduction to the ''Canvas'' facilities. It can do much more... many events – we hope you’ll explore these issues on your own while we show you how to start your new ... ple example. Take a look at the code. <code python> import tkinter as tk window = tk.Tk() canvas =... ate_line(10, 380, 200, 10, 380, 380, 10, 380) button = tk.Button(window, text="Quit", command=window.d
2.3 A small lexicon of widgets - Part 3
104 Resultats, Darrera modificació:
= 2.3 A small lexicon of widgets - Part 3 There are two remaining widgets we want to tell you about – the first one is just a widget, while the second is, in fact, a **set of cooperating widgets**. The ''Entry'' widget not only presents a line of text, but is also able to **
2.1 A small lexicon of widgets - Part 1
97 Resultats, Darrera modificació:
= 2.1 A small lexicon of widgets - Part 1 == A small lexicon of widgets Now we’re ready to present a systematized set of so... bloat our course to an unmanageable size. We’re convinced that our collection is large enough to make you familiar with ''tkinter'' standards and habits,
1.8 Interacting with widget methods
75 Resultats, Darrera modificació:
hat ''Widget'' is an existing widget): <code python> Widget.after(time_ms, function) Widget.after_cancel(id) </code> * ''after()'' – this method expec... uments: the first is a **time interval specification** (expressed in milliseconds: 1 s = 1000 ms) and the second **points to an existing function**; succe
2.2 A small lexicon of widgets - Part 2
73 Resultats, Darrera modificació:
= 2.2 A small lexicon of widgets - Part 2 == Non-clickable widgets The next four widgets fall into the **non-clickable** category. They’re designed to present **textual** information and don’t have a ''command'' property, although y
1.4 Coloring your widgets
69 Resultats, Darrera modificació:
er words, what means can you use to order the button to be red or blue. There are at least three meth... d to meet your needs. We will tell you about them on the example of ''Button'' but don't forget that these ways are universal and can be used virtually everywhere. Let's check i
1.9 Looking at variables
35 Resultats, Darrera modificació:
ables == Variables To implement some of its functions, Tkinter uses a very special kind of variable ca... rvable variable to inform other objects that the contents of the input field have been changed. From ... t of view, such a variable is an object of the **container class**. This means that a variable of that... hat type of value you want to store in them, and don’t change your mind during the variable’s life. N