python模块tkinter的komponent-methods

demo
demo

原文

1. configure

1
2
3
w.config(option=value)
value = w.cget("option")
k = w.keys()

2. Event processing

1
2
3
4
5
6
7
8
mainloop()
w.mainloop()
w.quit()
w.wait_variable(var)
w.wait_visibility(window)
w.wait_window(window)
w.update()
w.update_idletasks()

3. Event callbacks

1
2
3
4
5
w.bind(event, callback)
w.unbind(event)
w.bind_class(event, callback)
w.bindtags()
w.bindtags(tags)

4. Alarm handlers and other non-event callbacks

1
2
3
id = w.after(time, callback)
id = w.after_idle(callback)
w.after_cancel(id)

5. Window management

1
2
w.lift()
w.lower()
1
2
3
w.winfo_width(), w.winfo_height()
w.winfo_reqwidth(), w.winfo_reqheight()
w.winfo_id()

7. The option database

1
2
w.option_add(pattern, value)
w.option_get(name, class)

8. window

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
destroy()
winfo_rooty() [
winfo_rootx() [
winfo_rgb(color) [
winfo_screen() [
winfo_screencells() [
winfo_screendepth() [
winfo_screenheight() [
winfo_screenmmheight() [
winfo_screenmmwidth() [
winfo_screenvisual() [
winfo_screenwidth() [#]
winfo_viewable() [#]
winfo_vrootheight() [#]
winfo_vrootwidth() [#]
winfo_vrootx() [#]
winfo_vrooty() [#]
winfo_width() [#]
winfo_x() [#]
winfo_y() [#]

9. clipboard

1
2
clipboard_append(string, **options) [#]
clipboard_clear(**options) [#]