i'm creating application. need true full screen application. this, mean no title bar @ top or around.
here basic version of code:
from tkinter import * window = tk() canvas = canvas(window, width=1400, height=820, bg="steelblue2") canvas.pack() xposition = 0 yposition = 0 temperature = "46" message = "the temperature right " + temperature indepth = "its clear night" def moveleft(event): global yposition, xposition if yposition == 0 , xposition > -2: x = 0 in range(40): canvas.move('test', x, 0) canvas.after(10) canvas.update() x -= 1 xposition -= 1 def moveright(event): global yposition, xposition if yposition == 0 , xposition < 2: xposition += 1 x = 0 in range(40): canvas.move('test', x, 0) canvas.after(10) canvas.update() x += 1 def moveup(event): global global yposition, xposition if xposition == 0 , yposition == 0: yposition += 1 x = 0 in range(10): canvas.move('test', 0, x) canvas.after(10) canvas.update() x -= 1 = canvas.create_text(700, 400, text=indepth, font=('helvetica neue ultralight', 50), fill="white", anchor='c') def movedown(event): global global yposition, xposition if xposition == 0 , yposition == 1: yposition -= 1 x = 0 canvas.delete(i) in range(10): canvas.move('test', 0, x) canvas.after(10) canvas.update() x += 1 test = canvas.create_text(700, 400, text=message, font=('helvetica neue ultralight', 50), fill="white", anchor='c', tag='test') window.bind("<left>", moveright) window.bind("<right>", moveleft) window.bind("<up>", moveup) window.bind("<down>", movedown) window.mainloop()
can suggest way change it's full screen?
window.attributes("-fullscreen",true)
should trick.
Comments
Post a Comment