0

When reading events from a simple button in PySimpleGui, spamming this button with mouseclicks will generate an event for each of the clicks.

When you try to do the same with Listboxes (by setting enable_events to True for this element) it seems like there is a timeout after each generated event. If you click once every second, it will generate all the events. But if you spam-click it like before it will only generate the first event.

I'm not sure if this behavior is intended (only started learning PySimpleGui today), but is there a way to get rid of this delay? I tried checking the docs but can't find it mentioned anywhere.

Opifex
  • 362
  • 4
  • 15

1 Answers1

0

I think the reason is that a Listbox reacts to click events, but also to double click events. A Button does not. This behavior looks like consistent.

albar
  • 3,020
  • 1
  • 14
  • 27
  • But then why is there a delay after the double-click event? Shouldn't it be possible to have two double-click events after one another? – Opifex Jul 28 '20 at 10:29