Posts by MATA NEGRO • 58 points
6 posts
-
0
votes2
answers901
viewsA: How to hide a Widget?
Use the method place_forget() from tkinter import * def esconder(): texto.place_forget() root = Tk() texto = Label(root, text = 'Exemplo') texto.place(x=200, y=200) bt = Button(root, text =…
-
1
votes1
answer51
viewsA: How do I hold forever when the <Down> key is pressed and gain +10? (Python3 + Tkinter)
y = 10 def moveDown(event): global y try_01 = 0 try_01 = int(try_01) Quadrado.place(y=y) while try_01 <= 10: y += 10 try_01 += 1 …
-
0
votes1
answer363
viewsQ: How do I animate an object on canvas with a bind with an animation already "running"
I was making a copy game of Space Invaders but when I went to do the "shot" of the ship, I came across a following problem : As seen in Gif, when I press the key, everything on the canvas "freezes"…
-
-4
votes1
answer258
viewsQ: How do I stop For when the range is 5?
How do I stop the For cycle when it reaches a certain condition ? For example, it would be when c equals 5. for c in range(1,10): print('a,b,c') if c % 5: break Then a function will be used, but I…
-
3
votes1
answer134
viewsA: Why are you playing the Windows error sound instead of the specified file?
The problem was missing the flag SND_NODEFAULT and the directory was wrong. import winsound winsound.PlaySound('teste.wav', winsound.SND_FILENAME | winsound.SND_PURGE | winsound.SND_NODEFAULT) I…
-
0
votes1
answer134
viewsQ: Why are you playing the Windows error sound instead of the specified file?
import winsound winsound.PlaySound('C:/Users/Computador/Music/Action!/som1.wav', winsound.SND_ASYNC) When I run this script the file is not touched som1.wav, but rather the Windows error sound. Why?…