Closed ghost closed 3 years ago
There're something wrong or missed in your code,
Start
is '-OK-'
, not 'Start'
# ---===--- The event loop --- #
while True:
event, values = window.read()
print(event)
if event in ('-EXIT-', None): # Exit button or X
break
elif event == "-OK-": # Wrong key for statement elif event == "Start":
sg.popup('In Callback Function 2')
keep_on_top=True
in Main window will get popup under main window, then invisible. window = sg.Window('Demo of Nice Looking Buttons', layout,
grab_anywhere=True,
#keep_on_top=True, mark this line to avoid main window always on top and popup invisible
no_titlebar=True,
use_default_focus=False,
font='any 15',
background_color='black')
Thanks Again Jason ..
Can you provide a link to where the code is located?
I ran these 2 and got windows with no problem.
Want to make sure the Demo Programs posted run of course.
IMO, he should do some mofications on https://github.com/PySimpleGUI/PySimpleGUI/blob/master/DemoPrograms/Demo_Buttons_Nice_Graphics.py
I don't remember which demo scripts with some problems, but they did.
Please watch for demos with problems. I try to keep them up to date with the coding guidelines, etc.
This demo is from Dec 2019, so it a bit old, but it should still function as all the other demos.
Some of the PIL functions have recently improved, in large part due to your help with them. I've not updated all of the PIL based demos yet to use the newer calls.
If there are bugs in the demos, please flag them as they're a very important part of the overall PySimpleGUI system.
I didn't record which demo scripts with errors.
Here's one example,
https://github.com/PySimpleGUI/PySimpleGUI/blob/master/DemoPrograms/Demo_PIL_Use.py
sg.ICON_BASE64_LIST
used, but not defined.
Should be sg.EMOJI_BASE64_LIST
Thank you! I totally missed that one!
Type of Issue (Enhancement, Error, Bug, Question)
Bug [Bug] Unable to call functions or popup when using nice buttons from demo for ex - clicking on start should give pop but nothing happens
Operating System
windows 10
PySimpleGUI Port (tkinter, Qt, Wx, Web)
tkinter
Versions
Version information can be obtained by calling
sg.main_get_debug_data()
Or you can print each version shown in () Python version: 3.8.9 (tags/v3.8.9:a743f81, Apr 6 2021, 14:02:34) [MSC v.1928 64 bit (AMD64)] port: tkinter tkinter version: 8.6.9 PySimpleGUI version: 4.41.2 PySimpleGUI filename: C:\Program Files\Python38\lib\site-packages\PySimpleGUI\PySimpleGUI.pyPython version (
sg.sys.version
)3.8.9 (tags/v3.8.9:a743f81, Apr 6 2021, 14:02:34) [MSC v.1928 64 bit (AMD64)]
PySimpleGUI Version (
sg.__version__
)3.8.9 (tags/v3.8.9:a743f81, Apr 6 2021, 14:02:34) [MSC v.1928 64 bit (AMD64)]
GUI Version (tkinter (
sg.tclversion_detailed
), PySide2, WxPython, Remi)4.41.2
Your Experience In Months or Years (optional)
Years Python programming experience 4 Years Programming experience overall 4 Have used another Python GUI Framework? (tkinter, Qt, etc) (yes/no is fine) yes Anything else you think would be helpful?
Troubleshooting
These items may solve your problem. Please check those you've done by changing - [ ] to - [X]
Detailed Description
Code To Duplicate
A short program that isolates and demonstrates the problem (Do not paste your massive program, but instead 10-20 lines that clearly show the problem)
This pre-formatted code block is all set for you to paste in your bit of code:
Screenshot, Sketch, or Drawing