ecookbook restoring the folders for testing...
This commit is contained in:
parent
0574702876
commit
9f40a47d30
109 changed files with 0 additions and 0 deletions
41
docs/eCookbook/multi-threaded/desktop-widget-launcher-bar.md
Normal file
41
docs/eCookbook/multi-threaded/desktop-widget-launcher-bar.md
Normal file
|
@ -0,0 +1,41 @@
|
|||
## Desektop Widget - Launcher Bar
|
||||
|
||||
### Trivial Operations - Changing layouts
|
||||
|
||||
This demo has a nice little "minimize" feature. You click on a downarrow and the entire interface will "minimize" down into a single image.
|
||||
|
||||
Here is the code that does those minimize and restore operations:
|
||||
|
||||
|
||||
```python
|
||||
elif event == sg.SYMBOL_DOWN_ARROWHEAD:
|
||||
window['-BUTTON COL-'].update(visible=False)
|
||||
window['-MINIMIZED COL-'].update(visible=True)
|
||||
elif event == '-MINIMIZED IMAGE-':
|
||||
window['-BUTTON COL-'].update(visible=True)
|
||||
window['-MINIMIZED COL-'].update(visible=False)
|
||||
```
|
||||
|
||||
If you're minimizing, then you want to hide the buttons and show the image. If you're restoring, then you're hiding the image and showing the panel of buttons.
|
||||
|
||||
A simple thing to describe means less code for you and less complexity too.
|
||||
|
||||
### The Button Bar
|
||||
|
||||
Add a floating bar that enables easy launching of all programs on your system. Or launch your Python program or anything you want because you're a Python programmer.
|
||||
|
||||
This is a copy of the Demo Program you'll find on the PySimpleGUI Repo:
|
||||
|
||||
https://github.com/PySimpleGUI/PySimpleGUI/blob/master/DemoPrograms/Demo_Desktop_Widget_Launcher_Bar.py
|
||||
|
||||
It's a simple "launcher" application that you can run, move anywhere you want, and it'll return there next time you run it.
|
||||
|
||||
Add your own buttons, images, etc, to launch your favorite programs, Python code, or call functions. Anything's possible when you write your own utilities
|
||||
|
||||

|
||||
|
||||
For this Trinket, I matched the background color and used the settings feature to set it. This is why you will see a JSON file with the Trinket.
|
||||
|
||||
|
||||
<iframe src='https://trinket.io/embed/pygame/2593918099?start=result' width='100%' height='500' frameborder='0' marginwidth='0' marginheight='0' allowfullscreen></iframe>
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue