반응형
tck/tk ][ menu 생성
■ 사용법
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# | |
# test by kyoung chip , jang | |
# | |
from tkinter import * | |
from tkinter import Menu | |
window = Tk() | |
window.title("hello world") | |
menu = Menu(window) | |
new_item = Menu(menu) | |
new_item.add_command(label='New') | |
new_item.add_separator() | |
new_item.add_command(label='Edit') | |
menu.add_cascade(label='File', menu=new_item) | |
window.config(menu=menu) | |
window.mainloop() |

반응형
'Python > 0x1D-tcltk' 카테고리의 다른 글
tck/tk ][ menu 생성2 (0) | 2019.10.10 |
---|---|
tck/tk ][ gui 어플리케이션 생성 (0) | 2019.10.10 |
tck/tk ][ 간단한 버튼 만들기 (0) | 2019.10.10 |