Cerca

Heus ací els resultats de la cerca.

Python Professional Course Series: GUI Programming
109 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... Okay, that’s enough jokes about TLA’s for one course, all the more that GUI is present nearly everywhe
2.4 Shaping the main window and conversing with the user
73 Resultats, Darrera modificació:
Shaping the main window and conversing with the user The main window is a very specific construct, as... o change is its **title**. The title is defaultly set to ''Tk'', no matter what your application is na... nnamed. To change the window’s title, you would use a method named ''title()''. Our sample code show... e directory where the application resides; * **use** a ''PhotoImage'' class constructor to convert t
2.3 A small lexicon of widgets - Part 3
63 Resultats, Darrera modificació:
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 **edit** the text according to the user’s actions. Using an ''Entry'' is necessary when
1.2 Let TkInter speak!
61 Resultats, Darrera modificació:
age 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 **tkinter** components; * **cr
1.6 Events and how to handle them
51 Resultats, Darrera modificació:
nsible for preparing the proper reactions to the user’s actions. Now it’s time to show you some detai... us your attention on a very helpful method we’ll use to arrange communication between you and your application. Of course, you can use the regular ''print()'' function to show messages and present a debug trace. The output
1.9 Looking at variables
51 Resultats, Darrera modificació:
bles To implement some of its functions, Tkinter uses a very special kind of variable called an **observable variable**. This variable works like a regula... e – any change of the variable’s state can be **observed** by a number of external agents. For example, the ''Entry'' widget can use its own observable variable to inform other objec
1.7 Visiting widgets’ properties
47 Resultats, Darrera modificació:
roperties As you already know, every widget has a set of properties, and the widget’s user is able to **change** them by modifying the widget’s **appearan... e’ll show you how to manipulate properties and present a basic set of the most usable widget properties. A widget's property is not just an **object prop
1.4 Coloring your widgets
45 Resultats, Darrera modificació:
l you about them while discussing the widgets themselves. Currently, the most important thing is getti... ''tkinter'', in other words, what means can you use to order the button to be red or blue. There are... he example of ''Button'' but don't forget that these ways are universal and can be used virtually everywhere. Let's check if tkinter understands **Englis
1.5 A simple GUI application
43 Resultats, Darrera modificació:
ow we're going to build a very simple and rather useless GUI application. Does that sound weird? Maybe... . Our fabulous goal will look like the vision presented below: {{ :info:cursos:pue:python-pcpp1:m3:pa... nt controller – look at the code in the editor to see how to do it. <code python> import tkinter as t... d ''Label'' – a non-clickable widget able to **present short textual information**, passed to the widg
2.1 A small lexicon of widgets - Part 1
37 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 course to an unmanageable size. We’re convinced that our... sts. You already know some of the widgets. In these cases, we’ll limit our descriptions to the necess
2.5 Working with the Canvas
36 Resultats, Darrera modificació:
th drawings, text, frames, and other widgets. Please treat this story as a basic introduction to the '... much more for you – for example, it can scroll itself and react to many events – we hope you’ll explore these issues on your own while we show you how to start... venture. This will require neither palette nor easel – ''Canvas'' brings you all you need. Let’s sta
1.3 Settling widgets in the window's interior
35 Resultats, Darrera modificació:
= 1.3 Settling widgets in the window's interior == Settling widgets A familiarity with the ''Button'' widget a... lace()'', which you learned about in the previous section. To be precise, there are **three different methods**. These methods are implemented by **geome
1.8 Interacting with widget methods
31 Resultats, Darrera modificació:
few more of them, and we’ll start with two which seem to be very specific. We can even say that the sense of their existence is very closely bound to the unique features of **event programming**. The method
2.2 A small lexicon of widgets - Part 2
15 Resultats, Darrera modificació:
*non-clickable** category. They’re designed to present **textual** information and don’t have a ''command'' property, although you can use ''bind()'' to simulate similar behavior. The ''L... hows how the ''textvariable'' accompanied by an observable variable can be used to **continuously** update the ''Label''’s contents. <code python> import