Cerca

Heus ací els resultats de la cerca.

Python Professional Course Series: GUI Programming
17 Resultats, Darrera modificació:
T industry. Okay, that’s enough jokes about TLA’s for one course, all the more that GUI is present near... er. They communicate bidirectionally. GUI stands for Graphical User Interface. In this three-word acro... ack. Are you ready? Okay, let’s go! == Terminals For a very long time (about 30 years or even longer) ... portant as it dictated the way software was built for a very long time, almost an era in the history of
1.9 Looking at variables
9 Resultats, Darrera modificació:
n be **observed** by a number of external agents. For example, the ''Entry'' widget can use its own obs... y created variables are set to: * integer ''0'' for ''IntVar''; * float ''0.0'' for ''DoubleVar''; * Boolean ''False'' for ''BooleanVar''; * string ''""'' for ''StringVar''. For exa
1.3 Settling widgets in the window's interior
8 Resultats, Darrera modificació:
your intentions and to **find the best location** for each widget. Unfortunately, its assumptions may n... w.mainloop() </code> The snippet we've prepared for you shows how the ''place()'' method works. It p... g }} Now let's play with ''width'' and ''height'' for a moment. Look, we've added some arguments to th... in advance – ''grid()'' finds the proper numbers for you. Let's try it. The most commonly used ''grid
1.6 Events and how to handle them
8 Resultats, Darrera modificació:
me **to the event manager**, which is responsible for dispatching them to all the application component... me of your callbacks, which makes you responsible for preparing the proper reactions to the user’s acti... nd how you control the event manager’s behavior. For now, however, we want you to focus your attention... o behave in a mature way. The function we’ll use for our experiments is named ''showinfo()'', it comes
1.2 Let TkInter speak!
7 Resultats, Darrera modificació:
s tk</code> Okay, we know there’s no accounting for taste, but it’s definitely worth accounting for code readability. The choice is entirely up to you. I... r An event handler is a piece of code responsible for **responding to all clicks addressed to our butto... ameter is not the only way offered by ''tkinter'' for this purpose; moreover, **callbacks can be replac
2.5 Working with the Canvas
6 Resultats, Darrera modificació:
to the ''Canvas'' facilities. It can do much more for you – for example, it can scroll itself and react to many events – we hope you’ll explore these issues... . Can you find the parts of the code responsible for all these actions? {{:info:cursos:pue:python-pcp... ecomes a **circle**. The options are the same as for ''create_polygon()''. Let’s test it. Run the cod
2.3 A small lexicon of widgets - Part 3
4 Resultats, Darrera modificació:
' is necessary when you are going to ask the user for any textual information: name, password, email, e... teps you already know – look, we’ve engaged the ''for'' loop to simulate the presence of eight recently... t file...", underline=5, menu=sub_sub_menu_file) for i in range(8): number = str(i + 1) sub_su... t file...", underline=5, menu=sub_sub_menu_file) for i in range(8): number = str(i + 1) sub_su
2.4 Shaping the main window and conversing with the user
4 Resultats, Darrera modificació:
functions display a modal dialog window and wait for a user response. The dialog’s behavior is determi... d YES; * **icon** – sets the non-default icon for the dialog: possible values are: ERROR, INFO, QUE... ons titled ''OK'' and ''Cancel'' (it returns True for OK and False otherwise). You can observe its beh... titled ''Retry'' and ''Cancel'' (it returns True for Retry and False otherwise). Check it out! <code
1.4 Coloring your widgets
3 Resultats, Darrera modificació:
not very precise. Tkinter can do something more for you. Tkinter recognizes over 750 predefined colo... d:20231223-110114.png }} Setting non-zero values for more than one component produces **intermediate c... tkinter'' color names. Now try to find RGB codes for all your favorite colors. There are so many choic
1.5 A simple GUI application
3 Resultats, Darrera modificació:
inloop() </code> Our window looks like this one for now: {{ :info:cursos:pue:python-pcpp1:m3:pasted:2... lls it with its own color. We expect nothing more for now. Let's check it out. <code python> import t... ent operator. The class offers a dedicated method for that purpose, and the method is named ''set()''.
2.2 A small lexicon of widgets - Part 2
2 Resultats, Darrera modificació:
/. Such a //window works// as a **master widget** for all the widgets embedded within it. Moreover, the... ach. Note: we’ve used different geometry managers for both ''Frames''. This is another advantage of the
1.7 Visiting widgets’ properties
1 Resultats, Darrera modificació:
tion? Of course you do! The property responsible for storing font information is – obviously – named '
1.8 Interacting with widget methods
1 Resultats, Darrera modificació:
callbacks – it would **freeze** your application for the whole nap time; the ''after()'' method return
2.1 A small lexicon of widgets - Part 1
1 Resultats, Darrera modificació:
ode in the editor pane. The sample we’ve prepared for you makes use of the ''checkbutton'' and does two