Cerca

Heus ací els resultats de la cerca.

2.3 A small lexicon of widgets - Part 3
8 Resultats, Darrera modificació:
racer remembers its **previous** state (using the last_s variable) and restores the field to this state... kinter as tk def digits_only(*args): global last_string string = text.get() if string == ... g.isdigit(): # Field's content is valid. last_string = string else: text.set(last_string) last_string = '' window = tk.Tk() text = tk
2.5 Working with the Canvas
7 Resultats, Darrera modificació:
= 2.5 Working with the Canvas == Canvas Our last meeting is devoted to the ''Canvas'' – a widget that b... rawing a line, with the difference being that the last segment (connecting the first and the last points) in the chain is drawn **automatically** (you don’t... ed to specify the same point as the first and the last (x,y) pair: <code python> canvas.create_polygon
Python Professional Course Series: GUI Programming
5 Resultats, Darrera modificació:
letter acronym, a representative of a well-known class of acronyms which plays a very important role in... rs. How do you like it? Take a look at the two classical terminals which exerted the greatest influen... . It's called **event-driven programming**. == Classical vs. event-driven paradigm What is EDP like? ... nlike? First of all, detecting, registering and classifying all of a user's actions is beyond the prog
1.2 Let TkInter speak!
5 Resultats, Darrera modificació:
ackage contains a bunch of functions, constants, classes, objects, and modules used to build GUI applic... in fact, a reflection of an object of the Button class. To bring a button to life, you have to: * create a **Button** class object (it'll be done by the class's constructor) * place the button inside the main window (it'll
1.5 A simple GUI application
3 Resultats, Darrera modificació:
it? It's set to hold an object of the ''IntVar'' class. This object is designed to store **integer** va... d?" **No, we can't.** Objects of the ''IntVar'' class are used by ''tkinter'' to **organize internal c... alue, you can't use the assignment operator. The class offers a dedicated method for that purpose, and
1.6 Events and how to handle them
3 Resultats, Darrera modificació:
f **any length** (but remember, the screen isn’t elastic and won’t stretch if you’re going to display a... vent object is an instantiation of the ''Event'' class. Actually, it’s a container filled with some mor... umber of the object’s properties. <code python> class Event: : : </code> Note: not all proper
2.1 A small lexicon of widgets - Part 1
3 Resultats, Darrera modificació:
'' widget is created by a **constructor** of its class. The very first argument of the constructor invo... utton_1.config(state=tk.NORMAL) button_1.flash() else: button_1.flash() button_1.config(state=tk.DISABLED) def mouseover(ev):
2.4 Shaping the main window and conversing with the user
2 Resultats, Darrera modificació:
e provided by you. The icon is transferred by the last method’s argument, but if you want this to work ... pplication resides; * **use** a ''PhotoImage'' class constructor to convert the PNG file into an inte
1.8 Interacting with widget methods
1 Resultats, Darrera modificació:
odbye” to widgets now, as we’re going to place the **observable variables** under our magnifying glass.
1.9 Looking at variables
1 Resultats, Darrera modificació:
such a variable is an object of the **container class**. This means that a variable of that kind has t