Cerca
Heus ací els resultats de la cerca.
Resultats de text complet:
- 2.3 A small lexicon of widgets - Part 3
- 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 you are going to ask the user for any textual information: name, password, ema
- Python Professional Course Series: GUI Programming
- m. Moreover, it’s a three-letter acronym, a representative of a well-known class of acronyms which pla... y important role in the IT industry. Okay, that’s enough jokes about TLA’s for one course, all the more that GUI is present nearly everywhere. Look around you – you’ll see a couple of different devices equipped with screens: phone, tablet, co
- 1.6 Events and how to handle them
- = 1.6 Events and how to handle them == Event handling As you already know, events are the fuel which propel the application’s movements. All events come **to the event manager**, whic
- 1.2 Let TkInter speak!
- . The GUI application itself consists of four essential elements: * **importing** the needed **tkinter** components; * **creating** an application’s main window;... *widgets** to the window; * **launching** the event controller. That’s all. Really. Looks too good
- 1.5 A simple GUI application
- s that sound weird? Maybe, but the application, when ready, will make you more accustomed to some ''tkinter'' **habits** and **conventions**. Our fabulous goal will look like the vision presented below: {{ :info:cursos:pue:python-pcpp1:m3:pas... ious** – we'll construct a window and launch an event controller – look at the code in the editor to s
- 1.4 Coloring your widgets
- them while discussing the widgets themselves. Currently, the most important thing is getting to know h... everywhere. Let's check if tkinter understands **English** – look at the code in the editor, our test... window.mainloop() </code> Note the two new arguments we use in the constructor invocation: ''bg'' (w... olor”//) and ''fg'' (//“foreground-color”//). We went along the line of least resistance here – we've
- 1.8 Interacting with widget methods
- 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 methods are named (assuming
- 1.3 Settling widgets in the window's interior
- s section. To be precise, there are **three different methods**. These methods are implemented by **geometry managers**. ''Place'' is the most detailed ... ry about possible conflicts and failures, you may entrust the whole problem to ''tkinter''. It'll try to guess your intentions and to **find the best location** for each w
- 1.9 Looking at variables
- = 1.9 Looking at variables == Variables To implement some of its functions, Tkinter uses a very specia... ate can be **observed** by a number of external agents. For example, the ''Entry'' widget can use its own observable variable to inform other objects that the contents of the input field have been changed. From a t
- 1.7 Visiting widgets’ properties
- ’ll show you how to manipulate properties and present a basic set of the most usable widget properties... med ''prop'' and you want to read its value and then set it with a new value, you can do this in the f... se the text property to: * **diagnose** the current button’s state; * **change** the button’s stat... t to tell you about is ''font''. Every widget presenting a piece of text (e.g., ''Button'' and ''Label
- 2.1 A small lexicon of widgets - Part 1
- 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 woul... ize. We’re convinced that our collection is large enough to make you familiar with ''tkinter'' standards and habits, and at the same time will encourage you to carry out your own experiments and
- 2.4 Shaping the main window and conversing with the user
- ', no matter what your application is named, or even if it's unnamed. To change the window’s title, y... tle each time you click over it, until you do it ten times, after which the title remains 0. <code py... The icon is transferred by the last method’s argument, but if you want this to work successfully, you ... t the PNG file into an internal ''tkinter'' representation (''PhotoImage()'' is a part of ''tkinter'',
- 2.5 Working with the Canvas
- 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 your new adventure. This will require neither palette nor easel... polygonal **chain**) consisting of three line segments. The application can be terminated using the Qu... anvas(master, options...) </code> Its first argument specifies the master widget (as usual). A set of
- 2.2 A small lexicon of widgets - Part 2
- non-clickable** category. They’re designed to present **textual** information and don’t have a ''comma... ed to **continuously** update the ''Label''’s contents. <code python> import tkinter as tk def to_string(x): return "Current counter\nvalue is:\n" + str(x) def plus(): ... e properties**) but is able to **format** the presented text by fitting it automatically to the widget