9 lines
638 B
Markdown
9 lines
638 B
Markdown
|
This example shows how you can use a new capability in PySimpleGUI.... the ability to create custom events that will be returned to you through your call to `window.read()`.
|
||
|
|
||
|
In this case, the desired events are when a window receives and loses focus. This is an advanced capability that most applications don't need, but it's nice to know it's available should you need it.
|
||
|
|
||
|
The same kind of constructions can be used to bind right clicks to buttons for example.
|
||
|
|
||
|
|
||
|
<iframe src='https://trinket.io/embed/pygame/49c5d264d8?start=result' width='100%' height='500' frameborder='0' marginwidth='0' marginheight='0' allowfullscreen></iframe>
|