Update UI.py, UtilPack.py, and ui_Tki.py
This commit is contained in:
26
ui_Tki.py
Normal file
26
ui_Tki.py
Normal file
@@ -0,0 +1,26 @@
|
||||
import os
|
||||
import sys
|
||||
import tkinter as tk
|
||||
|
||||
def sayhello():
|
||||
print("Hello")
|
||||
|
||||
def main(argc, argv):
|
||||
# 기본 창 설정
|
||||
root = tk.Tk()
|
||||
root.title("Hello World App") # 창 제목 설정
|
||||
root.geometry("300x200") # 창 크기 설정
|
||||
|
||||
# 버튼 생성
|
||||
button = tk.Button(root, text="Click Me", command=sayhello)
|
||||
|
||||
# 버튼을 창에 배치
|
||||
button.pack(pady=20)
|
||||
|
||||
# 이벤트 루프 실행
|
||||
root.mainloop()
|
||||
|
||||
if __name__ == '__main__':
|
||||
argc = len(sys.argv)
|
||||
argv = sys.argv
|
||||
main(argc, argv)
|
||||
Reference in New Issue
Block a user