Bug Found from PySimpleGUI spin element
Personne n'a encore pris cette issue.
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 55/100
Piste de recherche
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.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
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.
- Langage dominant
- Python
- Étoiles
- 865
- Forks
- 106
- Métriques de merge des PR
- Aucune PR mergée en 30 j
Préparer son environnement
Ce projet ne fournit ni conteneur de développement, ni Dockerfile, ni guide de contribution : l'installation est à votre charge. Commencez par son README, et consultez notre guide de la première contribution pour les étapes générales.
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de spyoungtech/FreeSimpleGUI
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 90/100
spyoungtech/FreeSimpleGUI#109 ·
-
Difficulté 2/5 1-3 heures Accessibilité débutants 68/100
spyoungtech/FreeSimpleGUI#86 · 1 commentaire · 2 réactions ·
-
Added - Dracula theme supportOuverte
Difficulté 3/5 1-2 jours Accessibilité débutants 64/100
spyoungtech/FreeSimpleGUI#110 ·
-
Difficulté 1/5 Moins d'une heure Accessibilité débutants 58/100
spyoungtech/FreeSimpleGUI#101 · 8 réactions ·
-
Difficulté 5/5 Plus d'une semaine Accessibilité débutants 35/100
spyoungtech/FreeSimpleGUI#99 · 1 réaction ·
Toutes les issues de spyoungtech/FreeSimpleGUI
Issues similaires
-
Performance: deprecated DeviceEntry.config_entries access blocks the event loop for tens of secondsOuverte
Difficulté 2/5 1-3 heures Accessibilité débutants 75/100
tuya/tuya_cloud_ha_bridge#14 ·
-
bug
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
semantica-agi/semantica#1968 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
Les mainteneurs répondent en général sous 1 jour
-
agent: ready area: submission priority: high type: docs
Difficulté 2/5 1-3 heures Accessibilité débutants 62/100
dkritarth/scopewatch#213 ·
Les mainteneurs répondent en général sous 1 jour
-
Broken link in RELEASE.mdPeut-être pris @Jah-yee l’a pris aujourd’hui. Ouverte
Difficulté 1/5 Moins d'une heure Accessibilité débutants 88/100
sphinx-contrib/httpdomain#143 ·
Les mainteneurs répondent en général sous 1 jour