728x90
import tkinter.messagebox as msgbox
from tkinter import *
root =Tk()
root.title(" GUI")
root.geometry("640x480")
Label(root, text ="메뉴를 선택해 주세요").pack(side ="top")
Button(root, text ="주문하기").pack(side ="bottom")
# 메뉴 프래임
frame_burger = Frame(root, relief ="solid", bd =1)
frame_burger.pack(side="left", fill ="both", expand =True)
Button(frame_burger, text ="햄버거").pack()
Button(frame_burger, text ="치즈버거").pack()
Button(frame_burger, text ="치킨버거").pack()
# 음료 프레임
frame_drink = LabelFrame(root, text ="음료")
frame_drink.pack(side="left", fill ="both", expand =True)
Button(frame_drink, text ="콜라").pack()
Button(frame_drink, text ="사이다").pack()
root.mainloop()
결과
728x90
'개발자 모드 > 파이썬(python)' 카테고리의 다른 글
파이썬 (python) grid 예제 소스 (0) | 2021.06.30 |
---|---|
파이썬 스크롤바 예제소스 (0) | 2021.06.29 |
파이썬 메세지 박스 기초 예제 (0) | 2021.06.27 |
파이썬 (python) UDP 소스 코드 (0) | 2021.06.26 |
파이썬 시간 모듈 사용법 (0) | 2021.06.25 |