Cerca
Heus ací els resultats de la cerca.
Resultats de text complet:
- Python Professional Course Series: GUI Programming
- = Python Professional Course Series: GUI Programming == What is GUI? GUI is an acronym. Moreover, it’s... How do you like it? Take a look at the two classical terminals which exerted the greatest influence... different from contemporary keyboards installed inside laptops) and nothing more. Some of the terminals (very expensive and very rare models) could be equipped with a
- 1.2 Let TkInter speak!
- GUI applications. The GUI application itself consists of four essential elements: * **importing**... ow it works. We’ll do it step-by-step. Ready The simplest (and at the same time the less controllable... m tkinter import Button</code> If you're an enthusiast of living life on the edge, you can simplify your import (but not the rest of your work) by using
- 2.4 Shaping the main window and conversing with the user
- = 2.4 Shaping the main window and conversing with the user The main window is a very specific construc... age in the same directory where the application resides; * **use** a ''PhotoImage'' class constructo... r you choose. If you want your main window to be sized in a non-default way, you have to use a low-le... height'' are decimal numbers specifying both dimensions in pixels. Note: you can use this invocation
- 2.3 A small lexicon of widgets - Part 3
- edit** the text according to the user’s actions. Using an ''Entry'' is necessary when you are going to... ing and pasting, etc.. We’ll show you only the basic possibilities of the widget, as it’s full equipment is extremely complex. Fortunately, we don’t need... er **only digits** – all other characters will be silently **ignored**. The tracer is invoked each ti
- 1.3 Settling widgets in the window's interior
- s of putting the widgets (not only the buttons) inside windows. There are more of them than just ''pla... however, protect you from some common mistakes causing the widgets to overlap each other or to place some of them, partially or fully, outside the window. If you don't want to deploy the widgets manually and worry about possible conflicts and failures, you may entrust the wh
- 1.5 A simple GUI application
- = 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... ntions**. Our fabulous goal will look like the vision presented below: {{ :info:cursos:pue:python-pcp... ted:20231223-110745.png }} There's nothing surprising yet. Let's add something to this dull gray area
- 1.7 Visiting widgets’ properties
- = 1.7 Visiting widgets’ properties == Widget properties As you already know, every widget has a set of... you how to manipulate properties and present a basic set of the most usable widget properties. A wid... ally an object, you can access its properties by using the dot notation. You have to use one of two possible ways of reading and setting widget properties’
- 2.2 A small lexicon of widgets - Part 2
- ll into the **non-clickable** category. They’re designed to present **textual** information and don’t ... nd'' property, although you can use ''bind()'' to simulate similar behavior. The ''Label'' widget displays some lines of text inside the window: <code python> label = Label(master,
- 1.9 Looking at variables
- e (i.e., it’s able to store values which are accessible to the outside world) but there is something more – any change of the variable’s state can be **ob... thon> s = StringVar() </code> If you want to **assign a value** to an observable variable, you have t... the variable’s kind. The example shows how to assign a string to a variable of the ''StringVar'' kin
- 2.5 Working with the Canvas
- and other widgets. Please treat this story as a basic introduction to the ''Canvas'' facilities. It ca... as'' brings you all you need. Let’s start with a simple example. Take a look at the code. <code pyt... raws a line (precisely: a polygonal **chain**) consisting of three line segments. The application can be terminated using the Quit button. Can you find the parts of the
- 1.6 Events and how to handle them
- nts come **to the event manager**, which is responsible for dispatching them to all the application co... nch some of your callbacks, which makes you responsible for preparing the proper reactions to the user... * the **second** string is a message to display inside the box; the string can be of **any length** (b... ask the ''showinfo()'' function to show us its possibilities. In the editor we've provided a very sim
- 1.8 Interacting with widget methods
- he function** (only once); note: this the only possible way of controlling the **passage of time** when using an event-driven environment.\\Why? Because you ... on identified by the **id** argument. Seems confusing? Not at all. The example will shed more light o... strate how the ''after()'' method works is rather simple (yes, absolutely; don’t you think so, too?).
- 1.4 Coloring your widgets
- gets == Adding colors Nearly everything you put inside your windows may be **colored**. Most widgets h... olors and we will tell you about them while discussing the widgets themselves. Currently, the most imp... red or blue. There are at least three methods designed to meet your needs. We will tell you about th... ound-color”//). We went along the line of least resistance here – we've just made use of regular Engli
- 2.1 A small lexicon of widgets - Part 1
- er – it would bloat our course to an unmanageable size. We’re convinced that our collection is large e... tool to represent //one of many// user choices. Assigning the same observable variable to more than on... here. Note: there is no ''toggle()'' method as a single ''Radiobutton'' performs such an operation. ... ogram defines two separate Radiobutton groups, consisting of two Radiobuttons. These groups are couple