ecookbook restoring the folders for testing...

This commit is contained in:
PySimpleGUI 2022-06-30 15:54:57 -04:00
parent 0574702876
commit 9f40a47d30
109 changed files with 0 additions and 0 deletions

View file

@ -0,0 +1,22 @@
# Toggle Buttons with Disable
This example shows a 4-state toggle button.
Normally a toggle button has 2 states:
1. On
2. Off
Buttons can also be disabled. When using PySimpleGUI to disable buttons, it will use the underlying GUI Framework's disable which usually adds a gray overlay or change the text to gray.
In the 4.35.0 release of PySimpleGUI, a new button state was added.... an "ignore". This state means that the button will not generate events. Unlike disable, ignore does not use the GUI framework's disable capability, thus it will not change the color.
This example program has these 4 states for the toggle button:
1. On
2. Off
3. On and disabled
4. Off and disabled
Disabled in this specific situation means ignore. The program itself is making the button appear to be disabled.
<iframe src='https://trinket.io/embed/pygame/4d0aea3fb3?start=result' width='100%' height='550' frameborder='0' marginwidth='0' marginheight='0' allowfullscreen></iframe>