Cerca

Heus ací els resultats de la cerca.

2.3 A small lexicon of widgets - Part 3
39 Resultats, Darrera modificació:
ches** a callback bound to the option; * **it unrolls** a new menu (actually a submenu) * if you... e below. We’ve made two changes – we’ve added two underlined property specifications to the ''Menu()'' invocations: * at line 15: underline=0 (sets Alt-F as a hotkey) * at line 18: underline=1 (sets Alt-B as a hotkey) <code python>
1.6 Events and how to handle them
17 Resultats, Darrera modificació:
an use an **empty** string, and the box will be **untitled** then; * the **second** string is a mess... *: How are the events identified? * **A**: By **unique names** – each event has its own name and the name is just a unified string. == Useful events We’ve gathered som... the application’s work, but you can also manually unbind the event at any moment (and bind it again wh
Python Professional Course Series: GUI Programming
11 Resultats, Darrera modificació:
phical? We have to do a little time traveling to understand that. Don’t worry, it won’t take long. We... ll. The GUI created completely new possibilities unknown to users in previous eras: clicks and taps r... ly different approach, and a completely different understanding of application activities. Let's summ... tle**. Of course, some of the windows may also be untitled. {{ :info:cursos:pue:python-pcpp1:m3:pasted
1.5 A simple GUI application
6 Resultats, Darrera modificació:
he widget. How does it work? * If you check or uncheck the ''Checkbutton'', the switch object will ... nge its state** – it will keep 0 if the widget is unchecked, and 1 otherwise. * If you change the st... eed to access the ''Checkbutton'' itself to check/uncheck it, as you can modify the ''switch'' value i... inside the group can be ''checked''. Clicking an unchecked member of the group will cause the current
1.7 Visiting widgets’ properties
4 Resultats, Darrera modificació:
owing strings: * "bold" * "italic" * "underline" * "overstrike" Do you want to see it... ton_2["padx"] = 10 button_2["pady"] = 5 button_2["underline"] = 1 window.mainloop() </code> This is w... me name. It seems to be obvious, but there’s one unobvious aspect – how to **name the anchors**. Thi... ery widget has the property we’re talking about. Unfortunately, the repertoire of available cursors i
1.8 Interacting with widget methods
4 Resultats, Darrera modificació:
e of their existence is very closely bound to the unique features of **event programming**. The metho... hich is as specific as the method itself – it’s a unique **id** of the planned invocation; is it usabl... method in a less devastating manner to get rid of unnecessary widgets while keeping the application al... dbye” to widgets now, as we’re going to place the **observable variables** under our magnifying glass.
1.4 Coloring your widgets
3 Resultats, Darrera modificació:
f ''Button'' but don't forget that these ways are universal and can be used virtually everywhere. Let's check if tkinter understands **English** – look at the code in the ed... you make some clicks on the **button** – it will unveil its little secret. Can you see? The colors o
2.4 Shaping the main window and conversing with the user
3 Resultats, Darrera modificació:
r what your application is named, or even if it's unnamed. To change the window’s title, you would us... ch changes its title each time you click over it, until you do it ten times, after which the title rem... ete>'', which enables the other widgets to react. Unfortunately, this doesn’t work with the main windo
1.3 Settling widgets in the window's interior
2 Resultats, Darrera modificació:
nd to **find the best location** for each widget. Unfortunately, its assumptions may not live up to yo... Only one of them can be used in one application, unless you want to turn your window into a big mess.
1.9 Looking at variables
2 Resultats, Darrera modificació:
occurs. The function returns a string which is a unique observer **identifier**. Don’t try to interpr... d'' – an internal observable variable identifier (unusable for us); * ''ix'' – an empty string (alwa
1.2 Let TkInter speak!
1 Resultats, Darrera modificació:
tely **invisible**. Moreover, it won't be visible until the event controller starts. To start the con
2.1 A small lexicon of widgets - Part 1
1 Resultats, Darrera modificació:
f them, however – it would bloat our course to an unmanageable size. We’re convinced that our collecti