Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Latest commit

 

History

History
History
17 lines (11 loc) · 525 Bytes

File metadata and controls

17 lines (11 loc) · 525 Bytes
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import tkinter as tk
# coding=utf-8
# 每一个Tkinter应用的主体框架都可以包含下面这部分,定义windows窗口和windows的一些属性,然后书写窗口内容,最后执行windows mainloop让窗口活起来
# 窗口主体框架
windows = tk.Tk() # 建立一个窗口对象
windows.title("My Windows") # 窗口名字
windows.geometry('200x100') # 窗口大小
var = tk.StringVar()
l = tk.Label(windows, text='OMG', bg='green', font=('Arial', 12), width=15, height=2)
l.pack()
windows.mainloop()
Morty Proxy This is a proxified and sanitized view of the page, visit original site.