โค้ด: เลือกทั้งหมด
from Tkinter import *
root = Tk()
def window(main):
main.title('Out Program')
main.update_idletasks()
width = 300
height = 300
x = (main.winfo_screenwidth() // 2)-(width // 2)
y = (main.winfo_screenheight() // 2)-(height // 2)
main.geometry('{}x{}+{}+{}'.format(width, height, x, y))
def main_content():
hello = Label(root, text= 'MD Soft ', font='times 24')
hello.pack()
window(root)
main_content()
mainloop()
โค้ด: เลือกทั้งหมด
from Tkinter import *
root = Tk()
def window(main):
main.title('Out Program')
main.update_idletasks()
width = 300
height = 300
x = (main.winfo_screenwidth() // 2)-(width // 2)
y = (main.winfo_screenheight() // 2)-(height // 2)
main.geometry('{}x{}+{}+{}'.format(width, height, x, y))
def main_content():
hello = Label(root, text= 'MD Soft ', font='times 24 bold')
hello.pack()
window(root)
main_content()
mainloop()
โค้ด: เลือกทั้งหมด
from Tkinter import *
root = Tk()
def window(main):
main.title('Out Program')
main.update_idletasks()
width = 300
height = 300
x = (main.winfo_screenwidth() // 2)-(width // 2)
y = (main.winfo_screenheight() // 2)-(height // 2)
main.geometry('{}x{}+{}+{}'.format(width, height, x, y))
def main_content():
hello = Label(root, text= 'MD Soft ', font='times 24 bold italic')
hello.pack()
window(root)
main_content()
mainloop()
โค้ด: เลือกทั้งหมด
from Tkinter import *
root = Tk()
def window(main):
main.title('Out Program')
main.update_idletasks()
width = 300
height = 300
x = (main.winfo_screenwidth() // 2)-(width // 2)
y = (main.winfo_screenheight() // 2)-(height // 2)
main.geometry('{}x{}+{}+{}'.format(width, height, x, y))
def main_content():
hello = Label(root, text= 'MD Soft ', font='times 24 bold italic underline')
hello.pack()
window(root)
main_content()
mainloop()
โค้ด: เลือกทั้งหมด
from Tkinter import *
root = Tk()
def window(main):
main.title('Out Program')
main.update_idletasks()
width = 300
height = 300
x = (main.winfo_screenwidth() // 2)-(width // 2)
y = (main.winfo_screenheight() // 2)-(height // 2)
main.geometry('{}x{}+{}+{}'.format(width, height, x, y))
def main_content():
hello = Label(root, text= 'MD Soft ', font='times 24 bold italic underline', fg='#001dff', bg='#ffe500')
hello.pack()
window(root)
main_content()
mainloop()