Tkinter Button Window exiting whilst running pygame

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ShadowCoder11
    New Member
    • Aug 2015
    • 1

    Tkinter Button Window exiting whilst running pygame

    I am a student and I am currently working on an assessment. I am using Tkinter buttons to continue the game. Since I am having multiple buttons, I need to be able to exit out of the button window after i press the button. I have asked many sources including my teachers but all appear to be on dismissing the single button. Can i please have help exiting the Tkinter WINDOW whilst continuing to run pygame.

    P.S I am running python 2.7 and the latest pygame.
  • dwblas
    Recognized Expert Contributor
    • May 2008
    • 626

    #2
    You can use grid_forget(), or whatever geometry manager you are using, to remove the frame, and the buttons that are in it. Effbot's doc http://effbot.org/tkinterbook/grid.htm

    Comment

    • bvdet
      Recognized Expert Specialist
      • Oct 2006
      • 2851

      #3
      Here is another possibility:
      Code:
      window.grab_release()
      window.withdraw()
      # do stuff here
      # restore the window
      window.deiconify()
      window.grab_set()

      Comment

      Working...