Cerca
Heus ací els resultats de la cerca.
Resultats de text complet:
- Python Professional Course Series: GUI Programming
- , that’s enough jokes about TLA’s for one course, all the more that GUI is present nearly everywhere. L... ven, even washing machine or heating controller – all these things have a screen, most of them colored ... home) with thousands of colored lights, blinking all the time, and hundreds of switches (also colored)... The user's answer was given by pressing a set of allowed keys. Simple? Simple. From our present-day de
- 1.6 Events and how to handle them
- he fuel which propel the application’s movements. All events come **to the event manager**, which is responsible for dispatching them to all the application components. This also means that ... oop() </code> Note – there are three widgets in all, but only one of them (the ''Button'') is clickab... some more or less helpful data. The data describe all the circumstances which are accompanied within th
- 1.4 Coloring your widgets
- nter recognizes over 750 predefined color names – all of them can be found [[https://www.tcl.tk/man/tcl... rent kinds. One of the RGB model implementations allows you to set the **saturation** of every of prim... ly does. Let's take a closer look at this. When all the components are set to zero (absence of the colors), we get black as a result. When all the components are set to 255 (full presence of t
- 1.2 Let TkInter speak!
- ; * **launching** the event controller. That’s all. Really. Looks too good to be true? Let us show h... code python>import tkinter</code> Note: it won’t allow you to access some modules built-in within the ... up to you. If you like to have full control over all your source code, you can make the import process... a reference to the target window) is obligatory. All others are optional. The one named **text** sets
- 1.3 Settling widgets in the window's interior
- widgets A familiarity with the ''Button'' widget allows us to show you some ways of putting the widget... ble ''place()'' method parameters are as follows (all of them are passed as keyword arguments): * ''... he home window's top-left corner. Let's see them all in action. <code python> import tkinter as tk w... od parameters are gathered below (as, previously, all of them are passed as keyword arguments): * ''
- 2.3 A small lexicon of widgets - Part 3
- name, password, email, etc. The widget implements all standard edit operations like inserting, removing... racer) to force a user to enter **only digits** – all other characters will be silently **ignored**. T... ow.mainloop() </code> Try to modify the code to allow the user to enter not more than five digits. T... ’ll show you the whole process step-bystep. Track all our movements carefully. Our steps are as follow
- 1.7 Visiting widgets’ properties
- s value, and the second named ''config()'', which allows you to **set** a new value to the property. T... is used when you don’t set the anchor property at all. Let’s do some tests. Look at the code in the ... oire of available cursors isn’t very impressive – all of them are described [[https://www.tcl.tk/man/tc... We’ll show you three of them. Feel free to test all the rest. Don’t forget to move the cursor over th
- 1.8 Interacting with widget methods
- by the **id** argument. Seems confusing? Not at all. The example will shed more light on it than tell... unction destroys the frame, but first it destroys all the frame’s children and its children’s children ... ction to organize a cyclical focus journey around all the buttons. We’ll say “goodbye” to widgets now,
- 2.1 A small lexicon of widgets - Part 1
- e ''tkinter'' widgets. We aren’t able to describe all of them, however – it would bloat our course to a... erent sets of arguments. As we mentioned before, all widgets fall into two categories: **clickable** a... ''checkbutton'' and does two things: * counts all the ''checkbutton''’s state changes and stores th
- 2.2 A small lexicon of widgets - Part 2
- uch a //window works// as a **master widget** for all the widgets embedded within it. Moreover, the ''F... that if you move the ''Frame'' to a new position, all its inner widgets will go with it. Note: the ''F... dow in the most convenient way. Pay attention to all four of the ''Buttons''’ constructors – how have
- 2.4 Shaping the main window and conversing with the user
- e into consideration how the change can influence all your widgets. Our sample code in the editor show... now we want to summarize the issue and to present all of the most useful tools. All these functions display a modal dialog window and wait for a user respo
- 2.5 Working with the Canvas
- neither palette nor easel – ''Canvas'' brings you all you need. Let’s start with a simple example. Ta... an you find the parts of the code responsible for all these actions? {{:info:cursos:pue:python-pcpp1:m
- 1.5 A simple GUI application
- resizes the window to a size large enough to fit all the packed widgets. This is its default behavior.