Tkinter

남생이·2024년 7월 26일

Robotics

목록 보기
1/8

Tkinter

  • 파이썬 GUI 프로그래밍 모듈


from tkinter import * # 모듈 임포트

root = Tk() # 클래스 객체 생성, 가장 상위 레벨의 윈도우 창 생성
root.mainloop() # 메서드 호출, 종료될 때까지 실행

root.tile("") # 창의 제목
root.geometry("300x200+100+100") # geometry("너비x높이 + x좌표 + y좌표)
root.resizable(False, False) # 윈도우 창 조절 여부, resizable(상하, 좌우)

label = Label(root, text='Hello world") # 라벨 생성
label.pack() # 레이블을 화면에 배치

button = Button(root, width = , text = '', overrelife = "", command=countplus)
button.pack()

entry = Entry(root, width=10)
etry.bind("<Return>", calc)
entry.pack()





profile
공부하는 거북이

0개의 댓글