โดย Jom07 » 10/04/2018 4:23 pm
การใช้งาน Python GUI (Tkinter) : การสร้างรูปแบบรูปไข่ หรือวงกลม
การทำงานของการเขียนโปรแกรมภาษา
Python มีมากมายหลากหลายในการเลือกใช้งาน จะมายกตัวอย่าง
โมดูล Tkinter ที่สามารถสร้างโปรแกรมขึ้นมา จะมายกตัวอย่างการสร้างรูป ไข่ หรือวงกลม ที่สามารถนำไปใช้งานในการทำงานต่าง ๆ ได้
ตัวอย่าง
โค้ด: เลือกทั้งหมด
from Tkinter import *
root = Tk()
canvas = Canvas(root, width=370, height=320)
canvas.pack()
gb = canvas.create_oval(100, 100, 250, 200, fill="green")
rb = canvas.create_oval(200, 100, 300, 200, fill="red")
root.mainloop()
ผลรัน
บทความที่เกี่ยวข้อง
บทเรียน Python
VDO Tutorial - Python
บทเรียน Python Tensorflow
บทเรียน Python GUI
[b]การใช้งาน Python GUI (Tkinter) : การสร้างรูปแบบรูปไข่ หรือวงกลม[/b]
การทำงานของการเขียนโปรแกรมภาษา [url=https://www.mindphp.com/%E0%B8%84%E0%B8%B9%E0%B9%88%E0%B8%A1%E0%B8%B7%E0%B8%AD/73-%E0%B8%84%E0%B8%B7%E0%B8%AD%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3/2417-python-%E0%B8%84%E0%B8%B7%E0%B8%AD%E0%B8%AD%E0%B8%B0%E0%B9%84%E0%B8%A3.html]Python[/url] มีมากมายหลากหลายในการเลือกใช้งาน จะมายกตัวอย่าง[url=https://www.mindphp.com/forums/viewtopic.php?f=79&t=37198]โมดูล[/url] [url=https://www.mindphp.com/%E0%B8%9A%E0%B8%97%E0%B9%80%E0%B8%A3%E0%B8%B5%E0%B8%A2%E0%B8%99%E0%B8%AD%E0%B8%AD%E0%B8%99%E0%B9%84%E0%B8%A5%E0%B8%99%E0%B9%8C/vdo-tutorial-phpbb/83-content/python/5513-tkinter-python-platform.html]Tkinter[/url] ที่สามารถสร้างโปรแกรมขึ้นมา จะมายกตัวอย่างการสร้างรูป ไข่ หรือวงกลม ที่สามารถนำไปใช้งานในการทำงานต่าง ๆ ได้
[b]ตัวอย่าง[/b]
[code]
from Tkinter import *
root = Tk()
canvas = Canvas(root, width=370, height=320)
canvas.pack()
gb = canvas.create_oval(100, 100, 250, 200, fill="green")
rb = canvas.create_oval(200, 100, 300, 200, fill="red")
root.mainloop()
[/code]
[b]ผลรัน[/b]
[img]http://snap.mindphp.com/index.php?view=2018Apr10_5acc7eff44aff[/img]
[b]บทความที่เกี่ยวข้อง[/b]
[url=https://www.mindphp.com/%E0%B8%9A%E0%B8%97%E0%B9%80%E0%B8%A3%E0%B8%B5%E0%B8%A2%E0%B8%99%E0%B8%AD%E0%B8%AD%E0%B8%99%E0%B9%84%E0%B8%A5%E0%B8%99%E0%B9%8C/83-python.html]บทเรียน Python[/url]
[url=https://www.mindphp.com/vdo-tutorial-python.html]VDO Tutorial - Python[/url]
[url=https://www.mindphp.com/%E0%B8%9A%E0%B8%97%E0%B9%80%E0%B8%A3%E0%B8%B5%E0%B8%A2%E0%B8%99-php/246-python-tensorflow.html]บทเรียน Python Tensorflow[/url]
[url=https://www.mindphp.com/%E0%B8%9A%E0%B8%97%E0%B9%80%E0%B8%A3%E0%B8%B5%E0%B8%A2%E0%B8%99-php/245-python-gui.html]บทเรียน Python GUI[/url]