การใช้งาน Python GUI (Tkinter) : Color Chooser Dialog (ตัวเลือกสี)

ตอบกระทู้

รูปแสดงอารมณ์
:icon_plusone: :like: :plusone: :gfb: :-D :) :( :-o 8O :? 8) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :!: :?: :idea: :arrow: :| :mrgreen: :angry: :baa: :biggrin:
รูปแสดงอารมณ์อื่นๆ

BBCode เปิด
[img] เปิด
[url] เปิด
[Smile icon] เปิด

กระทู้แนะนำ
   

มุมมองที่ขยายได้ กระทู้แนะนำ: การใช้งาน Python GUI (Tkinter) : Color Chooser Dialog (ตัวเลือกสี)

การใช้งาน Python GUI (Tkinter) : Color Chooser Dialog (ตัวเลือกสี)

โดย Jom07 » 01/03/2018 5:07 pm

การใช้งาน Python GUI (Tkinter) : Color Chooser Dialog (ตัวเลือกสี) เป็นการสร้างหน้าต่างที่สามารถกดเลือกสีได้

ตัวอย่าง

โค้ด: เลือกทั้งหมด

from Tkinter import *
from tkColorChooser import askcolor
def getColor():
    color = askcolor()
    print color
Button(text='Select Color', command=getColor).pack()
mainloop()
ผลรัน
รูปภาพ

ข้างบน