Hi, I am working with Tkinter, and I have set up some simple code to run:
import tkinter
import re
from tkinter import *
global master
master = Tk()
# Start game Launcher
def FormGUI():
master.title("GAME TITLE")
SW = master.winfo_screenwidth() / 3.2
SH = master.winfo_screenheight() / 3.2
master.geometry("500x300+%d+%d" % (SW, SH))
Label(master,text="game:\nGAME TITLE").pack()
Button(master, text="Start game", command=DestroyStart, takefocus=1).pack()
master.wm_state(zoom)
# Destroy the GUI launcher window upon player starting the game.
def DestroyStart():
global master
master.destroy()
master = Tk()
ReformGui()
# Form the game's GUI window in full screen.
def ReformGui():
master.title("GAME TITLE")
SW = master.winfo_screenwidth()
SH = master.winfo_screenheight()
master.geometry("%dx%d+0+0" % (SW,SH))
master.attributes("-fullscreen", 1)
master.configure(bg="black")
Label(master, text="\"GAME TESTING TEXT\"",
background="black", foreground="white").pack()
FormGUI()
master.mainloop()
# END OF CODE
Everything in this code runs appropriately. The main goal of this code is to
open up two windows, one with fixed dimensions, the other with full-screen
enabled.
My problem is that with the code above, the full-screen window opens up
properly, however my taskbar shows over the full-screen. Until I click on the
full-screen window, the taskbar will not be hidden.
Am I doing something wrong, or is there a better way to create a full-screen
window in Tkinter with the taskbar hidden?
Note: Removing the 'import re' code above fixes the taskbar problem, however
the re module is apparently needed as I can't run the program properly as an
executable. Importing re fixes this problem. I'm running this program under
Windows.
--
http://mail.python.org/mailman/listinfo/python-list