Cerca

Heus ací els resultats de la cerca.

Python Professional Course Series: GUI Programming
49 Resultats, Darrera modificació:
three-letter acronym, a representative of a well-known class of acronyms which plays a very important role in the IT industry. Okay, that’s enough jokes about TLA’s for one course, all the more... worry, it won’t take long. We’re going to travel not more than fifty years back. Are you ready? Okay,... to a computer (don’t forget that the Internet had not been invented yet) and was rarely placed in the
2.3 A small lexicon of widgets - Part 3
43 Resultats, Darrera modificació:
t of cooperating widgets**. The ''Entry'' widget not only presents a line of text, but is also able t... python-pcpp1:m3:pasted:20231228-112558.png}} And now, some of ''Entry''’s methods: {{:info:cursos:pue... its** – all other characters will be silently **ignored**. The tracer is invoked each time the input ... this state if its current contents are invalid. Note: we’ve had to use the ''focus_set()'' method, a
1.6 Events and how to handle them
37 Resultats, Darrera modificació:
to handle them == Event handling As you already know, events are the fuel which propel the applicatio... ring the proper reactions to the user’s actions. Now it’s time to show you some details of the events... ow you control the event manager’s behavior. For now, however, we want you to focus your attention on... re going to display a whole encyclopedia volume); note: you can use the ''\n'' digraph to visually bre
1.2 Let TkInter speak!
35 Resultats, Darrera modificació:
Inter speak! == Importing TkInter As you already know, from Python's point of view TkInter is a packag... as a whole: <code python>import tkinter</code> Note: it won’t allow you to access some modules buil... ll have to import them separately. As you already now, such an import will force you to use the qualif... de python>import tkinter as tk</code> Okay, we know there’s no accounting for taste, but it’s defini
2.4 Shaping the main window and conversing with the user
29 Resultats, Darrera modificació:
your **operating system**. This means than you cannot manage the window like any other widget, as the ... **title**. The title is defaultly set to ''Tk'', no matter what your application is named, or even if... re’s one working solution, although we agree it’s not very elegant. Take a look at the code we've pro... conphoto(False, photo) window.mainloop() </code> Note: we’ve used the Python Institute’s logo as the
1.5 A simple GUI application
24 Resultats, Darrera modificació:
cation == Building a GUI application from scratch Now we're going to build a very simple and rather us... ng }} Are you ready? Let's start. As everyone knows, Rome wasn't built in a day, and our applicatio... op() </code> Our window looks like this one for now: {{ :info:cursos:pue:python-pcpp1:m3:pasted:20231223-110745.png }} There's nothing surprising yet. Let's add something to this
1.3 Settling widgets in the window's interior
22 Resultats, Darrera modificació:
us to show you some ways of putting the widgets (not only the buttons) inside windows. There are more... r each widget. Unfortunately, its assumptions may not live up to your expectations, and the final resu... nd tries to deploy the widgets according to them. Note the word general – they aren't as precise as th... that must be mentioned here: **these managers cannot be mixed**. Only one of them can be used in one
1.7 Visiting widgets’ properties
16 Resultats, Darrera modificació:
’ properties == Widget properties As you already know, every widget has a set of properties, and the w... usable widget properties. A widget's property is not just an **object property**. Although every widg... t, you can access its properties by using the dot notation. You have to use one of two possible ways o... 50, y=100, width=100) window.mainloop() </code> Note: we use the text property to: * **diagnose**
1.8 Interacting with widget methods
15 Resultats, Darrera modificació:
ve **methods** – you’ve met some of them already. Now we’re going to show you a few more of them, and ... manager **will invoke the function** (only once); note: this the only possible way of controlling the ... ntified by the **id** argument. Seems confusing? Not at all. The example will shed more light on it t... else: color = 'white' is_white = not is_white frame.config(bg=color) frame.af
2.1 A small lexicon of widgets - Part 1
13 Resultats, Darrera modificació:
of widgets - Part 1 == A small lexicon of widgets Now we’re ready to present a systematized set of som... ze. We’re convinced that our collection is large enough to make you familiar with ''tkinter'' standard... out your own experiments and tests. You already know some of the widgets. In these cases, we’ll limit... ets fall into two categories: **clickable** and **non-clickable**. We’ll start with the first. We thi
1.4 Coloring your widgets
10 Resultats, Darrera modificació:
urrently, the most important thing is getting to know how the colors are described in ''tkinter'', in ... ellow") button.pack() window.mainloop() </code> Note the two new arguments we use in the constructor... ** or even **grey**. It's easy and handy although not very precise. Tkinter can do something more for... red** (R), **green** (G) and **blue** (B). The phenomenon is utilized by the so-called **RGB color mod
2.2 A small lexicon of widgets - Part 2
8 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 presen... asted:20231228-111139.png}} The Label widget has no usable methods – sorry! The sample in the editor... on relative to the Frame’s **upper-left corner**, not the window’s one. It also means that if you move
1.9 Looking at variables
6 Resultats, Darrera modificació:
*explicitly created and initialized**. There is another important difference – these variables are **... n’t change your mind during the variable’s life. Note: you can only create an observable variable **a... proper constructor and save the returned object. Note: the newly created variables are set to: * in... ringVar'' kind: <code python> strng.set("To be or not to be") </code> If you need to **use the value**
2.5 Working with the Canvas
1 Resultats, Darrera modificació:
new adventure. This will require neither palette nor easel – ''Canvas'' brings you all you need. Let