Difference between revisions of "트킨터"

Jump to navigation Jump to search
231 bytes added ,  09:06, 6 April 2018
no edit summary
Line 636: Line 636:
  class MyFrame(Frame):
  class MyFrame(Frame):
     def __init__(self, master):
     def __init__(self, master):
         img = PhotoImage(file='로리.gif')
         img = PhotoImage(file='[[로리]].gif')
         lbl = Label(image=img)
         lbl = Label(image=img)
         lbl.image = img  # 레퍼런스 추가
         lbl.image = img  # 레퍼런스 추가
Line 643: Line 643:
  def main():
  def main():
     root = Tk()
     root = Tk()
     root.title('로린이 보기')
     root.title('[[로린이]] [[보지]]')
     root.geometry('500x400+10+10')
     root.geometry('500x400+10+10')
     myframe = MyFrame(root)
     myframe = MyFrame(root)
Line 664: Line 664:
  win = Tk()                   
  win = Tk()                   
  def clickMe():                 
  def clickMe():                 
     messagebox.showinfo('유두 만져졌다', "누군가 만졌다!")  
     messagebox.showinfo('[[유두]] 만져졌다', "누군가 만졌다!")  
  action = ttk.Checkbutton(win, text='내 유두를 만져줘', command = clickMe)  
  action = ttk.Checkbutton(win, text='내 유두를 만져줘', command = clickMe)  
  action.grid(column=1, row=0)  
  action.grid(column=1, row=0)  
Line 683: Line 683:
  from tkinter import messagebox
  from tkinter import messagebox
  win = Tk()
  win = Tk()
  win.title("나에게 삽입해줘!")
  win.title("나에게 [[삽입]]해줘!")
  win.geometry('200x100+200+200')
  win.geometry('200x100+200+200')
  def clickMe():
  def clickMe():
     str = <nowiki>''</nowiki>
     str = <nowiki>''</nowiki>
     if cVar1.get() == 1:
     if cVar1.get() == 1:
         str = str + '입에 사정 당함, '
         str = str + '[[입]]에 [[사정]] 당함, '
     if cVar2.get() == 1:
     if cVar2.get() == 1:
         str = str + '보지에 사정 당함, '
         str = str + '[[보지]]에 사정 당함, '
     if cVar3.get() == 1:
     if cVar3.get() == 1:
         str = str + '항문에 사정 당함, '
         str = str + '[[항문]]에 사정 당함, '
     if str == <nowiki>''</nowiki>:
     if str == <nowiki>''</nowiki>:
         str = "nothing was checked"
         str = "nothing was checked"
     messagebox.showinfo("임신 당함", str)
     messagebox.showinfo("[[임신]] 당함", str)
  cVar1 = IntVar()
  cVar1 = IntVar()
  c1 = ttk.Checkbutton(win, text="입", variable = cVar1)
  c1 = ttk.Checkbutton(win, text="입", variable = cVar1)
Line 744: Line 744:
  from tkinter import messagebox
  from tkinter import messagebox
  win = Tk ()
  win = Tk ()
  win.title("너가 가장 좋아하는 체위는?")
  win.title("[[너]]가 가장 좋아하는 [[체위]]는?")
  win.geometry('500x100+200+200')
  win.geometry('500x100+200+200')
  def clickMe():
  def clickMe():
     messagebox.showinfo("나에게 실험해봐!", str.get())
     messagebox.showinfo("[[나]]에게 [[실험]]해봐!", str.get())
  str = StringVar()
  str = StringVar()
  textbox = ttk.Entry(win, width=50, textvariable=str)
  textbox = ttk.Entry(win, width=50, textvariable=str)
  textbox.grid(column = 0 , row = 0)
  textbox.grid(column = 0 , row = 0)
  action=ttk.Button(win, text="쑤셔죠!", command=clickMe)
  action=ttk.Button(win, text="[[보지]]에 쑤셔죠!", command=clickMe)
  action.grid(column=0, row=1)
  action.grid(column=0, row=1)
  win.mainloop()
  win.mainloop()
Line 787: Line 787:
  from tkinter import messagebox
  from tkinter import messagebox
  win = Tk ()
  win = Tk ()
  win.title("근친상간")
  win.title("[[근친상간]]")
  win.geometry('200x100+200+200')
  win.geometry('200x100+200+200')
  def clickMe():
  def clickMe():
     messagebox.showinfo("임신 완료", str.get())
     messagebox.showinfo("[[임신]] 완료", str.get())
  str = StringVar()
  str = StringVar()
  combo = ttk.Combobox(win, width=20, textvariable=str)
  combo = ttk.Combobox(win, width=20, textvariable=str)
  combo['values'] = ('엄마', '누나', '여동생' , '딸')
  combo['values'] = ('[[엄마]]', '[[누나]]', '[[여동생]]', '[[]]')
  combo.grid(column = 0 , row = 0)
  combo.grid(column = 0 , row = 0)
  combo.current(0)
  combo.current(0)
  action=ttk.Button(win, text="강간", command=clickMe)
  action=ttk.Button(win, text="[[강간]]", command=clickMe)
  action.grid(column=0, row=1)
  action.grid(column=0, row=1)
  win.mainloop()
  win.mainloop()
Line 837: Line 837:
    
    
         self.master = master
         self.master = master
         self.master.title("오피걸 고객 입력")
         self.master.title("[[오피걸]] 고객 입력")
         self.pack(fill=BOTH, expand=True)
         self.pack(fill=BOTH, expand=True)
    
    
Line 888: Line 888:


예제로 배우는 파이썬 프로그래밍 - Tkinter 위젯 http://pythonstudy.xyz/python/article/121-Tkinter-%EC%9C%84%EC%A0%AF
예제로 배우는 파이썬 프로그래밍 - Tkinter 위젯 http://pythonstudy.xyz/python/article/121-Tkinter-%EC%9C%84%EC%A0%AF


= 계산기 =
= 계산기 =
https://www.daniweb.com/programming/software-development/code/467452/updated-tiny-tkinter-calculator-python
사칙연산 GUI 계산기


  <nowiki>''' tk_calculator_tiny2.py</nowiki>
  <nowiki>''' tk_calculator_tiny2.py</nowiki>
Line 977: Line 978:
  app = MyApp()
  app = MyApp()
  app.mainloop()
  app.mainloop()
[[사칙연산]]이 가능한 [[GUI]] [[계산기]]이다.
Updated Tiny Tkinter Calculator (Python)
https://www.daniweb.com/programming/software-development/code/467452/updated-tiny-tkinter-calculator-python


[[Category:파이썬]]
[[Category:파이썬]]
[[Category:프로그래밍]]
[[Category:프로그래밍]]
234

edits

Navigation menu