Commit 589f2712 by BellCodeEditor

auto save

parent 6a73c48a
Showing with 11 additions and 7 deletions
from tkinter import *
def printStr():
print('hello world')
windows1=Tk
button1=Button(windows1,text='点击我'command=printStr)
button1.pack()
windows1.mainloop()
\ No newline at end of file
from tkinter import colorchooser
def colorChoose():
colorTuple=colorchooser.askcolor()
print('选到颜色为:'coloTuple[0])
print('16进制颜色为:',colorTuple[1])
object1=Tk()
button1=Button(Windows1,text='选色',command=colorChoose)
canvas.pack()
canvas.create_line(30,30,150,150)
object1.mainloop()
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment