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)... an define their own style and colors of virtually all the GUI elements. Some operating systems devote
- 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... 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... seems clear, doesn't it? OK, but how to specify all these (more than 16 million) mixes in a comprehen
- 2.3 A small lexicon of widgets - Part 3
- = 2.3 A small lexicon of widgets - Part 3 There are two remaining widgets we want to tell you about – t... 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... ’ll show you the whole process step-bystep. Track all our movements carefully. Our steps are as follow
- 1.2 Let TkInter speak!
- ; * **launching** the event controller. That’s all. Really. Looks too good to be true? Let us show h... 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... s a piece of code responsible for **responding to all clicks addressed to our button**. The event hand
- 1.3 Settling widgets in the window's interior
- 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): * ''... as columnspan but refers to rows. Let's see them all in action. <code python> import tkinter as tk w
- 2.1 A small lexicon of widgets - Part 1
- = 2.1 A small lexicon of widgets - Part 1 == A small lexicon of widgets Now we’re ready to present a systematized se... 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
- 2.4 Shaping the main window and conversing with the user
- window = tk.Tk() window.title('Icon?') window.tk.call('wm', 'iconphoto', window._w, PhotoImage(file='lo... communicating with the OS’s window manager. The call asks the OS to exchange the window’s icon with th... window = tk.Tk() window.title('Icon?') window.tk.call('wm', 'iconphoto', window._w, PhotoImage(file='lo... e into consideration how the change can influence all your widgets. Our sample code in the editor show
- 2.2 A small lexicon of widgets - Part 2
- = 2.2 A small lexicon of widgets - Part 2 == Non-clickable widgets The next four widgets fall into the **non-clickable** category. They’re desi... 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
- 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.... our window – it’s a ''Checkbutton''. It’s a **small square** which can be filled with a **tick mark**... once – look! These are the ''Radiobuttons'', **small circles filled with a dot, or not**. The most imp
- 1.7 Visiting widgets’ properties
- 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.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