체크박스 (2) 썸네일형 리스트형 파이썬 tkinter 체크박스 예제소스 #======================================= # imports #======================================= import tkinter as tk from tkinter import ttk # Create instance win = tk.Tk() # Add a title win.title("Python GUI") # Adding a Label a_label = ttk.Label(win, text="A label") a_label.grid(column =0, row =0) # Button Click Event Function def click_me(): action.configure(text ="hello "+ name.get()+ " " + numb.. 파이썬python 체크박스checkbox 기초예제 from tkinter import * root =Tk() root.title(" GUI") root.geometry("640x480") chkvar = IntVar() #chkvar에 int 형으로 값을 저장한다. chkbox = Checkbutton(root, text="오늘 하루 보지 않기",variable= chkvar) #chkbox.select() # 자동 선택 처리 #chkbox.deselect() # 선택 해제 처리 chkbox.pack( ) chkvar2 = IntVar() chkbox2 = Checkbutton(root, text = "일주일 동안 보지 않기", variable = chkvar2) chkbox2.pack() def btncmd() : print(chkvar.get()) .. 이전 1 다음