Hello, OnlineGDB Q&A section lets you put your programming query to fellow community users. Asking a solution for whole assignment is strictly not allowed. You may ask for help where you are stuck. Try to add as much information as possible so that fellow users can know about your problem statement easily.

I need to use Tkinter

+5 votes
asked Aug 22, 2025 by anonymous

1 Answer

0 votes
answered Aug 23, 2025 by githubway2us (180 points)
import tkinter as tk
from tkinter import messagebox
Ex
import tkinter as tk

# สร้างหน้าต่างหลัก
root = tk.Tk()
root.title("แอปพลิเคชัน Tkinter แรกของฉัน")  # ตั้งชื่อหน้าต่าง
root.geometry("400x300")  # กำหนดขนาดหน้าต่าง (กว้าง x สูง)

# เพิ่มป้ายกำกับ (Label)
label = tk.Label(root, text="สวัสดี Tkinter!", font=("Arial", 14))
label.pack(pady=20)  # จัดวางป้ายกำกับและเพิ่มระยะห่าง

# รันแอปพลิเคชัน
root.mainloop()
Welcome to OnlineGDB Q&A, where you can ask questions related to programming and OnlineGDB IDE and receive answers from other members of the community.
...