Bug Found from PySimpleGUI spin element
まだ誰も着手していません。
評価
調査の方向性
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.
索引モデルが issue の本文から書いたものです。
説明
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.
- 主要言語
- Python
- スター
- 867
- フォーク
- 106
- 平均マージ
- 1分
- マージ済み PR(30日)
- 2
コントリビューションガイド
このリポジトリのコントリビューションガイドは索引されていません
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
spyoungtech/FreeSimpleGUI のほかの issue
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
spyoungtech/FreeSimpleGUI#109 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
spyoungtech/FreeSimpleGUI#86 · コメント 1 件 · リアクション 2 件 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 58/100
spyoungtech/FreeSimpleGUI#101 · リアクション 8 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
spyoungtech/FreeSimpleGUI#99 · リアクション 1 件 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
spyoungtech/FreeSimpleGUI#95 ·
spyoungtech/FreeSimpleGUI の issue をすべて見る
似ている issue
-
bug
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
stephrobert/dsoxlab#238 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
sublimehq/package_control#1780 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 65/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
nwg-piotr/nwg-displays#145 ·