Cerca

Heus ací els resultats de la cerca.

Python Professional Course Series: GUI Programming
110 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 p... t role in the IT industry. Okay, that’s enough jokes about TLA’s for one course, all the more that GUI
2.4 Shaping the main window and conversing with the user
94 Resultats, Darrera modificació:
e()''. Our sample code shows a window which changes its title each time you click over it, until you do it ten times, after which the title remains 0. <code python> ... e> Changing the main window’s icon is more troublesome if you want to do in a portable way. Here’s on... window.bind("&lt;Button-1&gt;", lambda e: window.destroy()) window.mainloop() </code> The key to suc
2.3 A small lexicon of widgets - Part 3
90 Resultats, Darrera modificació:
ating widgets**. The ''Entry'' widget not only presents a line of text, but is also able to **edit** ... g to the user’s actions. Using an ''Entry'' is necessary when you are going to ask the user for any te... , etc.. We’ll show you only the basic possibilities of the widget, as it’s full equipment is extremel... ne of text. Here are some of ''Entry''’s properties: {{:info:cursos:pue:python-pcpp1:m3:pasted:202312
1.2 Let TkInter speak!
74 Resultats, Darrera modificació:
ge contains a bunch of functions, constants, classes, objects, and modules used to build GUI applications. The GUI application itself consists of four essential elements: * **importing** the needed **... application’s main window; * adding a set of necessary **widgets** to the window; * **launching**
1.6 Events and how to handle them
59 Resultats, Darrera modificació:
l events come **to the event manager**, which is responsible for dispatching them to all the applicati... vents may launch some of your callbacks, which makes you responsible for preparing the proper reactions to the user’s actions. Now it’s time to show you some details of the events’ lives and anatomy. We’ll also show you how the events a
1.3 Settling widgets in the window's interior
51 Resultats, Darrera modificació:
recise, there are **three different methods**. These methods are implemented by **geometry managers**. ''Place'' is the most detailed one. It forces you to **precisely declare a widget's location**,... on't, however, protect you from some common mistakes causing the widgets to overlap each other or to p... ally and worry about possible conflicts and failures, you may entrust the whole problem to ''tkinter''
1.7 Visiting widgets’ properties
48 Resultats, Darrera modificació:
= 1.7 Visiting widgets’ properties == Widget properties As you already know, every widget has a set of properties, and the widget’s user is able to **change** them... avior**. We’ll show you how to manipulate properties and present a basic set of the most usable widget
1.4 Coloring your widgets
41 Resultats, Darrera modificació:
**colored**. Most widgets have dedicated properties to handle their colors and we will tell you about them while discussing the widgets themselves. Currently, the most important thing is getting to know how the colors are described in ''tkinter'', in other words, what means ... e red or blue. There are at least three methods designed to meet your needs. We will tell you about t
2.1 A small lexicon of widgets - Part 1
40 Resultats, Darrera modificació:
= A small lexicon of widgets Now we’re ready to present a systematized set of some of the ''tkinter'' widgets. We aren’t able to describe all of them, however – it would bloat our co... ourage you to carry out your own experiments and tests. You already know some of the widgets. In these cases, we’ll limit our descriptions to the necessa
2.5 Working with the Canvas
37 Resultats, Darrera modificació:
is devoted to the ''Canvas'' – a widget that behaves like a... **canvas**. It’s a flat, rectangular su... rface that you can cover with drawings, text, frames, and other widgets. Please treat this story as a basic introduction to the ''Canvas'' facilities. It can do much more for you – for example, it ca... d react to many events – we hope you’ll explore these issues on your own while we show you how to star
1.5 A simple GUI application
33 Resultats, Darrera modificació:
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 a... *. Our fabulous goal will look like the vision presented below: {{ :info:cursos:pue:python-pcpp1:m3:p... ed ''Label'' – a non-clickable widget able to **present short textual information**, passed to the wid
1.8 Interacting with widget methods
31 Resultats, Darrera modificació:
istence is very closely bound to the unique features of **event programming**. The methods are named ... e first is a **time interval specification** (expressed in milliseconds: 1 s = 1000 ms) and the second **points to an existing function**; successful invocation of the method causes the event manager to change its plans; when the number of millise
2.2 A small lexicon of widgets - Part 2
22 Resultats, Darrera modificació:
all into the **non-clickable** category. They’re designed to present **textual** information and don’t have a ''command'' property, although you can use '... behavior. The ''Label'' widget displays some lines of text inside the window: <code python> label = ... The ''Label'' widget contains two usable properties, but you need to remember that they are mutually
1.9 Looking at variables
20 Resultats, Darrera modificació:
= 1.9 Looking at variables == Variables To implement some of its functions, Tkinter uses a very special kind of variable called an **observab... a regular variable (i.e., it’s able to store values which are accessible to the outside world) but th