-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4398c55
commit d4cdd77
Showing
4 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import tkinter as tk | ||
|
||
窗口 = tk.Tk() | ||
窗口.title('图形应用程序') | ||
窗口.geometry('500x300+600+300') | ||
|
||
def 登录(): | ||
登录窗口 = tk.Toplevel(窗口) | ||
登录窗口.title('请登录...') | ||
登录窗口.geometry('200x200+750+350') | ||
|
||
登录按钮 = tk.Button(text='登录', command=登录) | ||
登录按钮.place(relx=0.5, rely=0.5) | ||
|
||
窗口.mainloop() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
import 图快 | ||
|
||
窗口 = 图快.主窗口类() | ||
窗口.标题('图形应用程序') | ||
窗口.尺寸('500x300+600+300') | ||
|
||
def 登录(): | ||
登录窗口 = 图快.顶级窗口类(窗口) | ||
登录窗口.标题('请登录...') | ||
登录窗口.尺寸('200x200+750+350') | ||
|
||
登录按钮 = 图快.按钮类(文本='登录', 命令=登录) | ||
登录按钮.位置布局(相对x=0.5, 相对y=0.5) | ||
|
||
窗口.主循环() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from 海龟 import * | ||
|
||
颜色('黄色', '红色') | ||
开始填充() | ||
|
||
for i in range(5): | ||
前进(200) | ||
右转(144) | ||
|
||
结束填充() | ||
完成() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
from turtle import * | ||
|
||
color('yellow', 'red') | ||
begin_fill() | ||
|
||
for i in range(5): | ||
forward(200) | ||
right(144) | ||
|
||
end_fill() | ||
done() |