Bug Found from PySimpleGUI spin element
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 2/5
- Tempo stimato
- 1-3 ore
- Idoneità per principianti
- 55/100
Direzione di ricerca
Start in the main init.py file at the Spin element's ChangeSubmits handling, then inspect _SpinboxSelectHandler and _SpinChangedHandler. Reproduce the issue by holding a spin arrow and releasing it; done means the final value is captured and the corresponding event is fired without another click.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Windows 10
FreeSimpleGUI / PySimpleGUI
The issue is with the sg.Spin element when holding down either up or down arrows buttons continuously.
When you release the mouse button or , the final value would of not been captured internally unless i suppose you do an additional write_event_value or whatever.
sg.Spin(
values=[i for i in range(21)],
size=(2, 1),
font="Arial 9",
background_color=bgc,
enable_events=True,
readonly=True,
k="Lockout",
p=((8, 0), (30, 0))
)
in my code im busy with i cannot click additional time to get the final value using element.get()
So here if i start the default value as 5 and then hold down mouse button on the up arrow button in the spinbox.
When it reaches 20 and i let go the mouse button, i dont get the value 20 from call element.get() and infact while holding down the mouse button there are no more events fired for the spinbox.
They guys from PySimpleGUI actually had the correct code but then messed it up.
In the main __init__.py file find under element spin
if element.ChangeSubmits:
element.TKSpinBox.configure(command=element._SpinboxSelectHandler) ----- This needs to be commented out
# element.TKSpinBox.bind('<ButtonRelease-1>', element._SpinChangedHandler) --- enable this again but use _SpinboxSelectHandler
# element.TKSpinBox.bind('<Up>', element._SpinChangedHandler) --- leave as is
# element.TKSpinBox.bind('<Down>', element._SpinChangedHandler) ---- leave as is
For me doing this fixed the spinbox.
Also this internal method _SpinChangedHandler from the class Spin is pointless at the moment as it does not get called anywhere because they changed to using _SpinboxSelectHandler.
- Lingua principale
- Python
- Stelle
- 867
- Fork
- 106
- Metriche di merge delle PR
- Nessuna PR unita negli ultimi 30g
Preparare l'ambiente
Non abbiamo ancora controllato i file di configurazione di questo progetto. Parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di spyoungtech/FreeSimpleGUI
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100
spyoungtech/FreeSimpleGUI#109 ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
spyoungtech/FreeSimpleGUI#86 · 1 commento · 2 reazioni ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 64/100
spyoungtech/FreeSimpleGUI#110 ·
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 58/100
spyoungtech/FreeSimpleGUI#101 · 8 reazioni ·
-
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
spyoungtech/FreeSimpleGUI#99 · 1 reazione ·
Tutte le issue di spyoungtech/FreeSimpleGUI
Issue simili
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 88/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
spec-kitty/spec-kitty#5319 ·
I maintainer di solito rispondono entro 1 giorno
-
backend::vllm diffusion multimodal
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
openai/openai-agents-python#5229 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
I maintainer di solito rispondono entro 1 giorno