-
-
Import Tkinter
-
Creating Controls
-
import thinter
-
Creates the main window
-
#win = tkinter.Tk()
-
Set Title
-
win.title("xiaoxin")
-
Sizes and positions
-
win.geometry("400x400+200+20")
-
-
Enter the message loop (Control write here)
-
1
-
# Close the main window
-
win.mainloop ()
-
-
Specify the control master, that is, this control belongs to which
-
Tell GM (geometry manager) has had a control
-
-
tkinter components
-
Label
-
Label control to display text
-
-
Button
-
Create a button
-
-
Entry
-
Input Controls
-
-
Text
-
Text control, multi-line text displays
-
-
CheckButton
-
Checkbox controls
-
-
RadioButton
-
Radio button controls
-
-
ListBox
-
List box control, can contain one or more text boxes
-
effect
-
Display a string in a small window listbox control
-
-
-
Scale
-
For the user to change the value of the variable by dragging the pointer, horizontally and to be vertically
-
-
Spinbox
-
Value range controls
-
-
Menu
-
Menu control
-
Right menu
-
Top Menu
-
-
-
Combobox
-
Drop-down control
-
-
Frame
-
Frame control
-
Display a rectangular area on the screen, as a multi-container control
-
-
All the code which shows how to use
-
-
tkinter data
-
Tabular data
-
Tree data
-
-
tkinter layout
-
Absolute layout
-
The change has no effect on the position of the window
-
-
Relative layout
-
Changes affect the position of the window
-
-
Table layout
-
-
tkinter mouse events
-
<B1-Motion> button when the mouse is dragged in a small holding and control events
-
<B2-Motion> button when the mouse is dragged in a small holding and control events
-
<B3- Motion> When is the right mouse button and drag the gizmo is holding events
-
<Button-1> click the left mouse button when the event occurs
-
<Button-2> mouse button click event occurs
-
<Button-3> Right-click the time of the incident
-
<ButtonRelease-1> When the left mouse button release event occurs
-
<ButtonRelease-2> when the mouse button release event occurs
-
<ButtonRelease-3> when the right mouse button release event occurs
-
<Double-Button-1> Double-click on the left mouse button when the event occurs
-
<Double-Button-1> when double-clicking a mouse button event occurs
-
<Double-Button-1> when the right mouse button double-click event
-
<Enter> when the mouse cursor into the small incident member
-
<Key> when the keyboard click on any of the key events
-
<Leave> closing when the mouse event occurs away from the widget
-
<Return> When you click the "Enter" key event can be any key (like "A", "B", "Up", "Down", "Left", "Right") on the keyboard and one event binding
-
<Shift + A> When you click "Shitf + A" key events, can be AIt, Shift and Control and other key combinations
-
<Triple-Buttol-1> click the left mouse button when the three events
-
<Triple-Buttol-2> When the three middle-click events
-
<Triple-Buttol-3> When the three right-click event
-
event event properties
-
char
-
From the characters and key events related to keyboard input
-
-
keycode
-
And from key events associated with the key code key keyboard input (ie Unicode)
-
-
keysym
-
And from key events associated with the key symbol keys of the keyboard input (ie character)
-
-
on one
-
Key numbers (1,2,3) indicate which mouse button is pressed
-
-
widget
-
Small component object triggering the event
-
-
x and y
-
Small current mouse position of member units of pixels
-
-
x_root 和y_root
-
-
-
thinter graphical development interface
Guess you like
Origin www.cnblogs.com/fengzi759/p/12001177.html
Recommended
Ranking