Cerca

Heus ací els resultats de la cerca.

1.2 Let TkInter speak!
27 Resultats, Darrera modificació:
= 1.2 Let TkInter speak! == Importing TkInter As you already know, from Python's point of view TkInter ... elf consists of four essential elements: * **importing** the needed **tkinter** components; * **cr... at the same time the less controllable) way of importing tkinter facilities is to import the package as a whole: <code python>import tkinter</code> Note:
2.4 Shaping the main window and conversing with the user
24 Resultats, Darrera modificació:
fate is shared among **two** masters: **you** (supported by tkinter) and your **operating system**. Thi... after which the title remains 0. <code python> import tkinter as tk def click(*args): global cou... s icon is more troublesome if you want to do in a portable way. Here’s one working solution, although w... de we've provided in the editor. <code python> import tkinter as tk window = tk.Tk() window.title('Ic
2.3 A small lexicon of widgets - Part 3
22 Resultats, Darrera modificació:
the code and test its behavior. <code python> import tkinter as tk def digits_only(*args): glob... , option, ...) </code> Let’s summarize the most important menu traits: * a classic menu is actually ... add_command() method invocation) <code python> import tkinter as tk from tkinter import messagebox def about_app(): messagebox.showinfo("App", "The a
1.6 Events and how to handle them
13 Resultats, Darrera modificació:
rating how ''showinfo()'' works: <code python> import tkinter from tkinter import messagebox def clicked(): messagebox.showinfo("info", "some\ninfo")... itor won’t be a surprise to you. <code python> import tkinter as tk from tkinter import messagebox def click(): tk.messagebox.showinfo("Click!","I lo
Python Professional Course Series: GUI Programming
11 Resultats, Darrera modificació:
well-known class of acronyms which plays a very important role in the IT industry. Okay, that’s enough ... characters. The latter limitation is the most important as it dictated the way software was built for... 270]], and the second is the Digital Equipment Corporation’s [[https://en.wikipedia.org/wiki/VT100|VT10... ns. They had keyboards (very different from contemporary keyboards installed inside laptops) and nothin
1.5 A simple GUI application
11 Resultats, Darrera modificació:
the editor to see how to do it. <code python> import tkinter as tk window = tk.Tk() window.mainloop(... any moment of the widget's life. <code python> import tkinter as tk window = tk.Tk() label = tk.Labe... r window components. Our ''Frame'' plays a less important role – it just occupies a rectangle and fills... re for now. Let's check it out. <code python> import tkinter as tk window = tk.Tk() label = tk.Labe
2.5 Working with the Canvas
11 Resultats, Darrera modificació:
ample. Take a look at the code. <code python> import tkinter as tk window = tk.Tk() canvas = tk.Can... png}} Let’s see them in action. <code python> import tkinter as tk window = tk.Tk() canvas = tk.Canv... ect is easy to predict, isn’t it? <code python> import tkinter as tk window = tk.Tk() canvas = tk.Canv... o predict the shape it produces. <code python> import tkinter as tk window = tk.Tk() canvas = tk.Canv
1.3 Settling widgets in the window's interior
10 Resultats, Darrera modificació:
those utilized by ''pack''. There is one very important aspect of the issue that must be mentioned he... . Let's see them all in action. <code python> import tkinter as tk window = tk.Tk() button_1 = tk.Bu... rent now – can we be sure of it? <code python> import tkinter as tk window = tk.Tk() button_1 = tk.Bu... trol over the window's image. There is only one important but — full control means full responsibility.
1.7 Visiting widgets’ properties
7 Resultats, Darrera modificació:
le we've provided in the editor. <code python> import tkinter as tk def on_off(): global button ... Look at the code in the editor. <code python> import tkinter as tk def on_off(): global button ... Look at the code in the editor. <code python> import tkinter as tk window = tk.Tk() label_1 = tk.La... hows how some of the sizes work. <code python> import tkinter as tk window = tk.Tk() button_1 = tk.B
2.1 A small lexicon of widgets - Part 1
7 Resultats, Darrera modificació:
roperties and methods in action. <code python> import tkinter as tk def switch(): if button_1.cg... er clicking the ''Show'' button. <code python> import tkinter as tk from tkinter import messagebox def count(): global counter counter += 1 def ... 'checkbutton''. Analyze the code. <code python> import tkinter as tk from tkinter import messagebox d
1.4 Coloring your widgets
4 Resultats, Darrera modificació:
ing the widgets themselves. Currently, the most important thing is getting to know how the colors are d... n the editor, our test is there. <code python> import tkinter as tk window = tk.Tk() button = tk.Butt... ve showed our try in the editor. <code python> import tkinter as tk window = tk.Tk() button = tk.But... test showing how the RGB works: <code python> import tkinter as tk window = tk.Tk() button = tk.Butt
2.2 A small lexicon of widgets - Part 2
4 Resultats, Darrera modificació:
update the ''Label''’s contents. <code python> import tkinter as tk def to_string(x): return "Cu... sample code will tell you more. <code python> import tkinter as tk def do_it_again(): text.set(... ok at the example in the editor. <code python> import tkinter as tk window = tk.Tk() frame_1 = tk.Fr... de we've provided in the editor. <code python> import tkinter as tk window = tk.Tk() label_frame_1 =
1.8 Interacting with widget methods
3 Resultats, Darrera modificació:
ng you a long and winding story. <code python> import tkinter as tk def blink(): global is_white... his rule works **recursively**). <code python> import tkinter as tk def suicide(): frame.destroy... '' method to propel the process. <code python> import tkinter as tk def flip_focus(): if window.
1.9 Looking at variables
2 Resultats, Darrera modificació:
ly created and initialized**. There is another important difference – these variables are **typed**. Y... we've provided it in the editor. <code python> import tkinter as tk def r_observer(*args): print