Compare commits

...
Sign in to create a new pull request.

249 commits

Author SHA1 Message Date
PySimpleGUI
a0d3e7ce1f
Merge pull request #6613 from PySimpleGUI/Dev-latest
Ooops... forgot to update the Udemy coupon in the readme too.
2023-11-26 17:23:44 -05:00
PySimpleGUI
aae672824c Ooops... forgot to update the Udemy coupon in the readme too. 2023-11-26 17:23:25 -05:00
PySimpleGUI
117f40917d
Merge pull request #6611 from PySimpleGUI/Dev-latest
Bumped the version number (forgot to with the Udemy coupon)
2023-11-25 12:57:32 -05:00
PySimpleGUI
bf4630ec65 Bumped the version number (forgot to with the Udemy coupon) 2023-11-25 12:57:17 -05:00
PySimpleGUI
2bda3e1950
Merge pull request #6610 from PySimpleGUI/Dev-latest
New Udemy Coupon Code
2023-11-25 12:54:09 -05:00
PySimpleGUI
a2cd9fb702 New Udemy Coupon Code 2023-11-25 12:53:49 -05:00
PySimpleGUI
634eb9c652
Merge pull request #6609 from PySimpleGUI/Dev-latest
Make the multiple open demo program more useful
2023-11-23 14:28:46 -05:00
PySimpleGUI
05939b2725 Make the multiple open demo program more useful 2023-11-23 14:28:24 -05:00
PySimpleGUI
3f96ecf9ae Automated Update! 2023-11-19 18:30:26 +00:00
PySimpleGUI
148f548565
Merge pull request #6595 from PySimpleGUI/Dev-latest
Fixed docstring for execute_command_subprocess.  The command descript…
2023-11-13 13:15:38 -05:00
PySimpleGUI
e949083fda Fixed docstring for execute_command_subprocess. The command description was incorrect 2023-11-13 13:15:23 -05:00
PySimpleGUI
93358382b4 Automated Update! 2023-11-10 18:30:24 +00:00
PySimpleGUI
e59310d5fc Automated Update! 2023-11-07 18:30:22 +00:00
PySimpleGUI
2b8941fad9
Merge pull request #6579 from PySimpleGUI/Dev-latest
One more change to sizer so that it uses pad instead of size.
2023-10-29 13:23:31 -04:00
PySimpleGUI
cb39c58f98 One more change to sizer so that it uses pad instead of size. 2023-10-29 13:23:16 -04:00
PySimpleGUI
51f43ce318
Merge pull request #6578 from PySimpleGUI/Dev-latest
Added doctring and destroy previous right click menu to set_right_cli…
2023-10-29 13:11:11 -04:00
PySimpleGUI
85f3f472f7 Added doctring and destroy previous right click menu to set_right_click_menu AND Changed Sizer element to use Canvas instead of Column element 2023-10-29 13:10:57 -04:00
PySimpleGUI
e1f2d7f2d8
Merge pull request #6576 from PySimpleGUI/Dev-latest
New udemy coupon.
2023-10-27 12:13:37 -04:00
PySimpleGUI
bed18263e6 New udemy coupon. 2023-10-27 12:13:19 -04:00
PySimpleGUI
104cd14f35
Merge pull request #6575 from PySimpleGUI/Dev-latest
Update readthedocs.yml
2023-10-27 11:49:15 -04:00
PySimpleGUI
1ee5a7f9d2 Update readthedocs.yml 2023-10-27 11:49:01 -04:00
PySimpleGUI
6699f514a0
Merge pull request #6574 from PySimpleGUI/Dev-latest
New yaml file for readthedocs
2023-10-27 11:47:43 -04:00
PySimpleGUI
0f16031512 New yaml file for readthedocs 2023-10-27 11:47:21 -04:00
PySimpleGUI
cb324f35fc
Merge pull request #6573 from PySimpleGUI/Dev-latest
New Udemy Coupon Code
2023-10-27 11:37:19 -04:00
PySimpleGUI
f78e4913a2 New Udemy Coupon Code 2023-10-27 11:36:53 -04:00
PySimpleGUI
9b63e2e661 Automated Update! 2023-10-26 17:30:26 +00:00
PySimpleGUI
29127a73ee Automated Update! 2023-10-23 17:30:23 +00:00
PySimpleGUI
746b79d61a Automated Update! 2023-10-21 17:30:27 +00:00
PySimpleGUI
5131c537f5 Automated Update! 2023-10-20 17:30:27 +00:00
PySimpleGUI
79e9b6198e
Merge pull request #6554 from PySimpleGUI/Dev-latest
Fixed numpy deprecated problems.   Checking in improvement made long …
2023-10-16 08:58:12 -04:00
PySimpleGUI
fe31a0a7ed Fixed numpy deprecated problems. Checking in improvement made long ago buit forgot to check in 2023-10-16 08:57:47 -04:00
PySimpleGUI
57b72ba938
Merge pull request #6540 from PySimpleGUI/Dev-latest
Remove extra space accidently added (learned you can put spaces after…
2023-10-05 16:26:37 -04:00
PySimpleGUI
7f485c5f78 Remove extra space accidently added (learned you can put spaces after periods in Python?) 2023-10-05 16:26:20 -04:00
PySimpleGUI
03ed1948e2
Merge pull request #6539 from PySimpleGUI/Dev-latest
Replaced PIL's deprecated constant ANTIALIAS with LANCZOS
2023-10-05 16:12:38 -04:00
PySimpleGUI
3776730709 Replaced PIL's deprecated constant ANTIALIAS with LANCZOS 2023-10-05 16:11:51 -04:00
PySimpleGUI
77ba1eb26f
Merge pull request #6538 from PySimpleGUI/Dev-latest
Dev latest
2023-10-05 15:04:43 -04:00
PySimpleGUI
ddebd7a5c6 Added init for _mouse_offset_x and y in case tkinter doesn't call the mouse down callback 2023-10-05 15:03:52 -04:00
PySimpleGUI
5f8735d1f3 Fix for grab anywhere window movement and control+left_mouse_drag. Window move smoother, including the Move-All-Windows feature. Thank you JASON for the help! 2023-10-02 13:12:48 -04:00
PySimpleGUI
41e137e797
Merge pull request #6529 from PySimpleGUI/Dev-latest
New Udemy coupons... added earlier but forgot to post to GitHub
2023-10-02 09:52:25 -04:00
PySimpleGUI
2470d10afc New Udemy coupons... added earlier but forgot to post to GitHub 2023-10-02 09:52:10 -04:00
PySimpleGUI
dee0c81b58
Merge pull request #6512 from PySimpleGUI/Dev-latest
Dev latest
2023-09-21 16:10:57 -04:00
PySimpleGUI
4504ea77c3 New Udemy Coupon 2023-09-21 16:09:33 -04:00
PySimpleGUI
ce32fe3814 Automated Update! 2023-09-09 17:30:27 +00:00
PySimpleGUI
48c7b673c1 Automated Update! 2023-09-06 17:30:28 +00:00
PySimpleGUI
ed128a36f5 fixed bool instead of string in doctring 2023-08-31 12:24:21 -04:00
PySimpleGUI
ee972660c0
Merge pull request #6494 from PySimpleGUI/Dev-latest
Added  Added no_buffering option to popup_animated
2023-08-31 12:18:58 -04:00
PySimpleGUI
3907e7636e Added Added no_buffering option to popup_animated 2023-08-31 12:18:43 -04:00
PySimpleGUI
9cf9258835
Merge pull request #6488 from PySimpleGUI/Dev-latest
Made Table Element Header mouse-over and clicked be the inverse of th…
2023-08-28 07:09:54 -04:00
PySimpleGUI
0459adac69 Made Table Element Header mouse-over and clicked be the inverse of the normal header colors. Makes for a much nicer experience 2023-08-28 07:09:38 -04:00
PySimpleGUI
cf3345303d Automated Update! 2023-08-26 17:30:18 +00:00
PySimpleGUI
5761be84d8
Merge pull request #6484 from PySimpleGUI/Dev-latest
Rebuilt the call reference based on new set_index_color parms
2023-08-21 17:33:45 -04:00
PySimpleGUI
0b6eb6d5b3 Rebuilt the call reference based on new set_index_color parms 2023-08-21 17:33:27 -04:00
PySimpleGUI
4a5e2316e0
Merge pull request #6483 from PySimpleGUI/Dev-latest
Added highlight colors to the set_index_color method. Parms highlight…
2023-08-21 17:31:23 -04:00
PySimpleGUI
77ea65b8de Added highlight colors to the set_index_color method. Parms highlight_text_color & highlight_background_color control changing the highlight colors 2023-08-21 17:31:08 -04:00
PySimpleGUI
0f32107272
Merge pull request #6482 from PySimpleGUI/Dev-latest
New Udemy Coupon.  Added Listbox.set_index_color and Listbox.select_i…
2023-08-20 17:20:22 -04:00
PySimpleGUI
393050c1ae New Udemy Coupon. Added Listbox.set_index_color and Listbox.select_index to the SDK Call Reference 2023-08-20 17:20:05 -04:00
PySimpleGUI
31e8c51fba
Merge pull request #6481 from PySimpleGUI/Dev-latest
Added Listbox.select_index and Listbox.set_index_color
2023-08-19 11:53:22 -04:00
PySimpleGUI
2ece7d4ad5 Added Listbox.select_index and Listbox.set_index_color 2023-08-19 11:53:08 -04:00
PySimpleGUI
c34d28bcd4
Merge pull request #6480 from PySimpleGUI/Dev-latest
Fixed spelling errors... resuse should have been reuse
2023-08-16 09:35:14 -04:00
PySimpleGUI
1d3126f884 Fixed spelling errors... resuse should have been reuse 2023-08-16 09:34:58 -04:00
PySimpleGUI
81638809c8
Merge pull request #6478 from PySimpleGUI/Dev-latest
Fixed bug in Button.update.  Corrected when activeforeground and acti…
2023-08-14 12:22:29 -04:00
PySimpleGUI
c51d670956 Fixed bug in Button.update. Corrected when activeforeground and activebackground are set. Removing them in version above was a mistake 2023-08-14 12:22:12 -04:00
PySimpleGUI
db4fe52ec8
Merge pull request #6477 from PySimpleGUI/Dev-latest
Fixed bug in Button.update.  Was setting the activeforeground and act…
2023-08-13 11:47:30 -04:00
PySimpleGUI
f292d757de Fixed bug in Button.update. Was setting the activeforeground and activebackground which broke the mouseover or mouse press colors 2023-08-13 11:47:16 -04:00
PySimpleGUI
a39e180d13
Merge pull request #6473 from PySimpleGUI/Dev-latest
Allow window resizing when in single photo mode.  Updated the PIL res…
2023-08-10 12:45:21 -04:00
PySimpleGUI
854bdccdd3 Allow window resizing when in single photo mode. Updated the PIL resizing to much more recent resizing code. 2023-08-10 12:44:33 -04:00
PySimpleGUI
73a1b085ee
Merge pull request #6460 from PySimpleGUI/Dev-latest
Addition of black2 theme, Fix typo of text in _widget_was_created
2023-07-31 12:32:21 -04:00
PySimpleGUI
5035d24f2c Addition of black2 theme, Fix typo of text in _widget_was_created 2023-07-31 12:31:59 -04:00
PySimpleGUI
3c3312f5a2
Merge pull request #6444 from PySimpleGUI/Dev-latest
New tagline.  Updated call reference using newest docstrings
2023-07-12 17:21:12 -04:00
PySimpleGUI
aaf391508c New tagline. Updated call reference using newest docstrings 2023-07-12 17:20:56 -04:00
PySimpleGUI
76e4071239
Merge pull request #6436 from PySimpleGUI/Dev-latest
Changed Table click events to be generated on Button Release instead …
2023-07-04 08:50:24 -04:00
PySimpleGUI
2ce3c7f75e Changed Table click events to be generated on Button Release instead of Button (down) 2023-07-04 08:50:08 -04:00
PySimpleGUI
415f55c3a7
Merge pull request #6435 from PySimpleGUI/Dev-latest
Another try at correcting the Table.get docstring
2023-07-03 18:50:08 -04:00
PySimpleGUI
3de64e7d99 Another try at correcting the Table.get docstring 2023-07-03 18:49:55 -04:00
PySimpleGUI
e41be1c157
Merge pull request #6434 from PySimpleGUI/Dev-latest
Corrected the Table.get docstring to reflect that it returns a list o…
2023-07-03 18:47:20 -04:00
PySimpleGUI
d97777b262 Corrected the Table.get docstring to reflect that it returns a list of ints 2023-07-03 18:47:04 -04:00
PySimpleGUI
884d49a14f Automated Update! 2023-06-25 17:30:19 +00:00
PySimpleGUI
05d22968ae
Merge pull request #6425 from PySimpleGUI/Dev-latest
Changed Python GUIs for Humans to just GUIs for Humans
2023-06-23 10:36:20 -04:00
PySimpleGUI
891b0a5b36 Changed Python GUIs for Humans to just GUIs for Humans 2023-06-23 10:36:02 -04:00
PySimpleGUI
0fd1e011a1
Merge pull request #6421 from PySimpleGUI/Dev-latest
Fix for popup_get_file when using no_window=True. Now returns None if…
2023-06-19 11:23:16 -04:00
PySimpleGUI
130d5492f0 Fix for popup_get_file when using no_window=True. Now returns None if cancelled or window closed 2023-06-19 11:23:02 -04:00
PySimpleGUI
c11e950415
Merge pull request #6412 from PySimpleGUI/Dev-latest
New Udemy Coupon
2023-06-14 12:43:08 -04:00
PySimpleGUI
549330d0aa New Udemy Coupon 2023-06-14 12:42:47 -04:00
PySimpleGUI
654c2d2930
Merge pull request #6410 from PySimpleGUI/Dev-latest
Fix for crash when no headings specified for a table by casting value…
2023-06-13 17:42:34 -04:00
PySimpleGUI
8004b258a9 Fix for crash when no headings specified for a table by casting values into strings 2023-06-13 17:42:20 -04:00
PySimpleGUI
7f22061c3f
Merge pull request #6405 from PySimpleGUI/Dev-latest
Fix in pinning demo
2023-06-09 06:31:31 -04:00
PySimpleGUI
4a883851e6 Fix in pinning demo 2023-06-09 06:31:15 -04:00
PySimpleGUI
d3372dda27
Merge pull request #6397 from PySimpleGUI/Dev-latest
Fix for Combo.update background color changing incorrect widget setting.
2023-05-29 11:31:38 -04:00
PySimpleGUI
0ff0efa3c6 Fix for Combo.update background color changing incorrect widget setting. 2023-05-29 11:31:21 -04:00
PySimpleGUI
8b16f3183c
Merge pull request #6396 from PySimpleGUI/Dev-latest
Dev latest
2023-05-29 10:21:35 -04:00
PySimpleGUI
eeb95398e0 Added a function around the functional example 2023-05-29 10:21:17 -04:00
PySimpleGUI
b62648aa23 Expanded class wrapper demo to explain it's not a recommended design pattern. When initially released there was no explanation accompanying the code. 2023-05-29 10:19:32 -04:00
PySimpleGUI
79a3b85e73 Automated Update! 2023-05-25 17:30:21 +00:00
PySimpleGUI
e5d0c3d471 Automated Update! 2023-05-24 17:30:18 +00:00
PySimpleGUI
935285f715
Merge pull request #6384 from PySimpleGUI/Dev-latest
Dev latest
2023-05-21 19:39:33 -04:00
PySimpleGUI
955a7cba07 Additional of release notes for 4.60.5 dot release posted to PyPI 2023-05-21 19:39:16 -04:00
PySimpleGUI
e7b380ee7e Show Critical upgrade service messages. Removed the extra upgrade from github button from tab. 2023-05-21 19:38:07 -04:00
PySimpleGUI
ca66e38c99
Merge pull request #6383 from PySimpleGUI/Dev-latest
Only enable the Mac alpha channel 0.99 patch when tkinter version is …
2023-05-20 08:30:50 -04:00
PySimpleGUI
d368af0547 Only enable the Mac alpha channel 0.99 patch when tkinter version is 8.6.12. This will help 8.6.13 and later systems with window quality 2023-05-20 08:30:26 -04:00
PySimpleGUI
3952e1a438
Merge pull request #6382 from PySimpleGUI/Dev-latest
Addition of right click menu erase, save image and display of crosshairs
2023-05-18 12:05:22 -04:00
PySimpleGUI
440a34888f Addition of right click menu erase, save image and display of crosshairs 2023-05-18 12:05:07 -04:00
PySimpleGUI
003a03dfeb
Merge pull request #6380 from PySimpleGUI/Dev-latest
Added check for None and COLOR_SYSTEM_DEFAULT to fix a crash problem
2023-05-16 12:52:52 -04:00
PySimpleGUI
f3a7e10ce0 Added check for None and COLOR_SYSTEM_DEFAULT to fix a crash problem 2023-05-16 12:52:36 -04:00
PySimpleGUI
db1f02af2f
Merge pull request #6377 from PySimpleGUI/Dev-latest
Dev latest
2023-05-14 12:22:52 -04:00
PySimpleGUI
fe41f3cd1f New Udemy Coupon 2023-05-14 12:22:32 -04:00
PySimpleGUI
d7c24da2bf Automated Update! 2023-05-12 17:30:17 +00:00
PySimpleGUI
2e6b74f0f1 Input element - fix for bug with text color & logic wasn't quite right with the "read for disabled" stuff in the update as well as when making window 2023-05-11 15:37:47 -04:00
PySimpleGUI
74098a440b
Merge pull request #6370 from PySimpleGUI/Dev-latest
Custom Titlebar - Support for disable close, disable resizing, disabl…
2023-05-09 09:21:30 -04:00
PySimpleGUI
43c49380a2 Custom Titlebar - Support for disable close, disable resizing, disable minimize. Better distro support and display of information from Upgrade Service 2023-05-09 09:21:12 -04:00
PySimpleGUI
def60b9ba8
Merge pull request #6356 from PySimpleGUI/Dev-latest
Added formatted_datetime_now function for easy formatting current dat…
2023-04-26 16:29:39 -04:00
PySimpleGUI
7cf4c102fe Added formatted_datetime_now function for easy formatting current date and time. Added code for Intelligent Upgrade Service but not enabling any popups while testing. Added timer_stop_usec that returns timer value in microseconds. 2023-04-26 16:29:09 -04:00
PySimpleGUI
ee794099bf
Merge pull request #6354 from PySimpleGUI/Dev-latest
Changed enter_submits to True so that the bind_return_key works corre…
2023-04-26 09:47:28 -04:00
PySimpleGUI
cb0da5887d Changed enter_submits to True so that the bind_return_key works correctly. 2023-04-26 09:47:14 -04:00
PySimpleGUI
fe7fbcbc44
Merge pull request #6350 from PySimpleGUI/Dev-latest
Moved update animation call to after check for window closed. Was get…
2023-04-22 10:13:50 -04:00
PySimpleGUI
fb5fdbdd5c Moved update animation call to after check for window closed. Was getting an error because attempt to update animation was happening after window was closed 2023-04-22 10:13:36 -04:00
PySimpleGUI
041c5ba4e6
Merge pull request #6348 from PySimpleGUI/Dev-latest
Fix for Input Elements unresponsive on MacOS 13.2.1 Ventura when no-t…
2023-04-21 18:25:25 -04:00
PySimpleGUI
71c50d40b4 Fix for Input Elements unresponsive on MacOS 13.2.1 Ventura when no-titlebar is enabled 2023-04-21 18:25:09 -04:00
PySimpleGUI
5efbff1cb8 Automated Update! 2023-04-21 17:30:19 +00:00
PySimpleGUI
a78498fcca
Merge pull request #6347 from PySimpleGUI/Dev-latest
Window threading changed so that end_key is now optional.  BE CAREFUL…
2023-04-21 07:00:12 -04:00
PySimpleGUI
f06fcdc0a6 Window threading changed so that end_key is now optional. BE CAREFUL when leaving it out as you won't be backward compatible. 2023-04-21 06:59:52 -04:00
PySimpleGUI
982cb755ba Automated Update! 2023-04-20 17:30:22 +00:00
PySimpleGUI
8b4e19a0cd Automated Update! 2023-04-19 17:30:25 +00:00
PySimpleGUI
8729971855
Update issue-form---must-fill-in-this-form-with-every-new-issue-submitted.md 2023-04-18 06:27:38 -04:00
PySimpleGUI
cdba184ed8
Merge pull request #6339 from PySimpleGUI/Dev-latest
Changed Radio activeforeground to be same as text color so mouseover …
2023-04-18 03:58:29 -04:00
PySimpleGUI
ad3465d9ba Changed Radio activeforeground to be same as text color so mouseover won't change color (previously did this for the Checkbox element) 2023-04-18 03:58:16 -04:00
PySimpleGUI
0bcd49a1b7
Merge pull request #6330 from PySimpleGUI/Dev-latest
Dev latest
2023-04-11 07:24:10 -04:00
PySimpleGUI
f1cd369302 New Udemy Coupon. Fix for bug in and better info in Watermark 2023-04-11 07:23:53 -04:00
PySimpleGUI
ad76b5deeb New Udemy Coupon 2023-04-11 07:22:47 -04:00
PySimpleGUI
635baca3cd Automated Update! 2023-03-27 17:30:35 +00:00
PySimpleGUI
74c1f7b337 Automated Update! 2023-03-25 17:30:34 +00:00
PySimpleGUI
5052aece6a Automated Update! 2023-03-17 17:30:25 +00:00
PySimpleGUI
4fe61e42d2 Automated Update! 2023-03-16 17:30:23 +00:00
PySimpleGUI
5b784253f5 Automated Update! 2023-03-15 17:30:30 +00:00
PySimpleGUI
15e56bd47d
Merge pull request #6303 from PySimpleGUI/Dev-latest
Fixed typo in coupon at top of SDK reference.  Picked up the changes …
2023-03-13 06:32:43 -04:00
PySimpleGUI
f97de3468b Fixed typo in coupon at top of SDK reference. Picked up the changes for GitHub's readme. 2023-03-13 06:32:31 -04:00
PySimpleGUI
e902230468
Merge pull request #6302 from PySimpleGUI/Dev-latest
Dev latest
2023-03-13 06:17:53 -04:00
PySimpleGUI
d8d5227240 New Udemy Coupon added 2023-03-13 06:17:36 -04:00
PySimpleGUI
2eed0afaeb New SDK call ref with net set_ibeam_color method added. New Udemy Coupon added to docs 2023-03-13 06:16:07 -04:00
PySimpleGUI
a10d9d3430
Merge pull request #6301 from PySimpleGUI/Dev-latest
Applied the Input I-Beam color fix to Multiline and Spin elements.  A…
2023-03-13 05:55:15 -04:00
PySimpleGUI
07f772c680 Applied the Input I-Beam color fix to Multiline and Spin elements. Added new method set_ibeam_color as another way to set this color (in addition to set_cursor) so that it's more explicit 2023-03-13 05:54:59 -04:00
PySimpleGUI
fcd03f4b6f
Merge pull request #6298 from PySimpleGUI/Dev-latest
Fixed problem where the insert cursor (I-beam) was being set to the t…
2023-03-12 08:39:29 -04:00
PySimpleGUI
a22884e2e3 Fixed problem where the insert cursor (I-beam) was being set to the theme's color not the color indicated by the individual Input element. 2023-03-12 08:39:17 -04:00
PySimpleGUI
d72a7672c1
Merge pull request #6287 from PySimpleGUI/Dev-latest
Added nightlight thickness parm to Checkbox so focus ring thickness c…
2023-03-09 05:49:58 -05:00
PySimpleGUI
3507b2708b Added nightlight thickness parm to Checkbox so focus ring thickness can be controlled when creating element 2023-03-09 05:49:42 -05:00
PySimpleGUI
cd7967fe4a
Merge pull request #6286 from PySimpleGUI/Dev-latest
Combo.update - added text and background color. Also made font parm w…
2023-03-09 05:43:37 -05:00
PySimpleGUI
4d02f3a515 Combo.update - added text and background color. Also made font parm work correctly with the dropdown list. (TRICKY!) 2023-03-09 05:43:20 -05:00
PySimpleGUI
3e0ade9797
Merge pull request #6285 from PySimpleGUI/Dev-latest
Demo Program to show new Watermark features
2023-03-07 20:14:23 -05:00
PySimpleGUI
3b7a17f6b6 Demo Program to show new Watermark features 2023-03-07 20:14:08 -05:00
PySimpleGUI
27e073b03c
Merge pull request #6279 from PySimpleGUI/Dev-latest
Fixed Mac crash due to "Bold" font modifier in watermark feature
2023-03-06 14:21:22 -05:00
PySimpleGUI
d447633ec3 Fixed Mac crash due to "Bold" font modifier in watermark feature 2023-03-06 14:21:06 -05:00
PySimpleGUI
15af7b7d06
Merge pull request #6277 from PySimpleGUI/Dev-latest
New Global Settings Feature - Window watermarking.... Use global sett…
2023-03-06 09:01:35 -05:00
PySimpleGUI
c24d8b6b87 New Global Settings Feature - Window watermarking.... Use global settings window to control or force on/off when making a window. 2023-03-06 09:00:57 -05:00
PySimpleGUI
f0eab8c1bd
Merge pull request #6268 from PySimpleGUI/Dev-latest
Changed Checkbox to not change color on mouseover on Linux.  Added th…
2023-03-01 12:11:59 -05:00
PySimpleGUI
8bd030f1a1 Changed Checkbox to not change color on mouseover on Linux. Added the optional window data row for internal texting ONLY 2023-03-01 12:10:23 -05:00
PySimpleGUI
34b935a196
Merge pull request #6266 from PySimpleGUI/Dev-latest
New Demo Program - CPU Utilization shown on a very nice VU Meter Graphic
2023-02-28 06:28:15 -05:00
PySimpleGUI
efa236369f New Demo Program - CPU Utilization shown on a very nice VU Meter Graphic 2023-02-28 06:27:57 -05:00
PySimpleGUI
af9794b2c2
Merge pull request #6261 from PySimpleGUI/Dev-latest
New Demo Program - Table with checkmarks
2023-02-25 13:21:39 -05:00
PySimpleGUI
8e6fa8100a New Demo Program - Table with checkmarks 2023-02-25 13:21:26 -05:00
PySimpleGUI
4a5f2d2907
Merge pull request #6258 from PySimpleGUI/Dev-latest
Dev latest
2023-02-24 08:58:55 -05:00
PySimpleGUI
8f74aa5c8d Picking up the latest Multiline & Output element feature that's on GitHub - new parameter autoscroll_only_at_bottom 2023-02-24 08:58:41 -05:00
PySimpleGUI
ba0e5fed78 Addition of Timer API calls 2023-02-24 08:58:02 -05:00
PySimpleGUI
3275279f9c Addition of Timer API Calls 2023-02-24 08:57:48 -05:00
PySimpleGUI
0cf29cc20f Addition of Timer API Calls section 2023-02-24 08:57:26 -05:00
PySimpleGUI
fdbdd18120
Merge pull request #6257 from PySimpleGUI/Dev-latest
Added autoscroll_only_at_bottom to Output element too
2023-02-24 04:51:39 -05:00
PySimpleGUI
73c692ebcc Added autoscroll_only_at_bottom to Output element too 2023-02-24 04:51:25 -05:00
PySimpleGUI
5ae9d3c88a
Merge pull request #6256 from PySimpleGUI/Dev-latest
Added autoscroll_only_at_bottom parameter to Multiline element
2023-02-24 04:37:50 -05:00
PySimpleGUI
ad67fe233e Added autoscroll_only_at_bottom parameter to Multiline element 2023-02-24 04:37:37 -05:00
PySimpleGUI
83bdad20f8
Merge pull request #6252 from PySimpleGUI/Dev-latest
Picked up docstring changes for Window.timer_start in the call reference
2023-02-23 12:01:45 -05:00
PySimpleGUI
1ae844e7fc Picked up docstring changes for Window.timer_start in the call reference 2023-02-23 12:01:31 -05:00
PySimpleGUI
2de8770897
Merge pull request #6251 from PySimpleGUI/Dev-latest
Added the variable name constants EVENT_TIMER and TIMER_KEY  to the W…
2023-02-23 12:00:41 -05:00
PySimpleGUI
2cc5b70aed Added the variable name constants EVENT_TIMER and TIMER_KEY to the Window.start_timer docstring 2023-02-23 12:00:25 -05:00
PySimpleGUI
2a4831ac63
Merge pull request #6250 from PySimpleGUI/Dev-latest
Changed Output Element in call reference.  Previously was steering us…
2023-02-23 11:56:35 -05:00
PySimpleGUI
86afe5ae57 Changed Output Element in call reference. Previously was steering users away from Output Element and to use Multiline instead. Now that the Output element is based directly on Multiline, this recommendation is no longer needed. 2023-02-23 11:56:20 -05:00
PySimpleGUI
6b9cb23b6d
Merge pull request #6249 from PySimpleGUI/Dev-latest
Addition of  the Window Timer API Calls currently on GitHub
2023-02-23 11:52:08 -05:00
PySimpleGUI
c4e37eff04 Addition of the Window Timer API Calls currently on GitHub 2023-02-23 11:51:55 -05:00
PySimpleGUI
62eb1f5781
Merge pull request #6245 from PySimpleGUI/Dev-latest
Ooops... forgot to bump version number
2023-02-21 11:59:12 -05:00
PySimpleGUI
98f383bffb Ooops... forgot to bump version number 2023-02-21 11:58:59 -05:00
PySimpleGUI
25ed11c581
Merge pull request #6244 from PySimpleGUI/Dev-latest
Changed layout error message (added "sometimes" to description))
2023-02-21 11:46:45 -05:00
PySimpleGUI
57528fdb5c Changed layout error message (added "sometimes" to description)) 2023-02-21 11:46:31 -05:00
PySimpleGUI
6aabac7637
Merge pull request #6242 from PySimpleGUI/Dev-latest
changed TabGroup.get to use the same method as the values dictionary …
2023-02-19 14:58:04 -05:00
PySimpleGUI
c8da36c9e3 changed TabGroup.get to use the same method as the values dictionary does that was just added in prior check-in 2023-02-19 14:57:49 -05:00
PySimpleGUI
3a7d72354a
Merge pull request #6241 from PySimpleGUI/Dev-latest
Fixed problem with TabGroup not identifying the currently active tab …
2023-02-19 14:05:10 -05:00
PySimpleGUI
f07d658e87 Fixed problem with TabGroup not identifying the currently active tab in the Values Dictionary is the label is blank on the Tab 2023-02-19 14:04:56 -05:00
PySimpleGUI
c88bd1f2ec Automated Update! 2023-02-14 18:30:24 +00:00
PySimpleGUI
a3936a60a9
Merge pull request #6231 from PySimpleGUI/Dev-latest
Tree Element - new parameter click_toggles_select
2023-02-13 18:00:34 -05:00
PySimpleGUI
83745112a6 Tree Element - new parameter click_toggles_select 2023-02-13 18:00:20 -05:00
PySimpleGUI
c963e86d3e Automated Update! 2023-02-12 18:30:19 +00:00
PySimpleGUI
8f76e053f0
Merge pull request #6225 from PySimpleGUI/Dev-latest
Removed second print on Mac for Alpha 0.99 patch
2023-02-12 11:52:47 -05:00
PySimpleGUI
282559db46 Removed second print on Mac for Alpha 0.99 patch 2023-02-12 11:52:33 -05:00
PySimpleGUI
185d0997bb
Merge pull request #6224 from PySimpleGUI/Dev-latest
Removed print when Mac Alpha Channel of 0.99 is applied.  Was acciden…
2023-02-11 13:59:09 -05:00
PySimpleGUI
a138621f9a Removed print when Mac Alpha Channel of 0.99 is applied. Was accidently let in for testing. 2023-02-11 13:58:57 -05:00
PySimpleGUI
e34564fb38
Merge pull request #6223 from PySimpleGUI/Dev-latest
Added a lambda example
2023-02-11 09:09:02 -05:00
PySimpleGUI
a059d92c8e Added a lambda example 2023-02-11 09:08:50 -05:00
PySimpleGUI
e3211b18ab
Merge pull request #6216 from PySimpleGUI/Dev-latest
New coupon added to call reference.  Forgot it needed changing too.  …
2023-02-07 19:14:48 -05:00
PySimpleGUI
dc84814eb2 New coupon added to call reference. Forgot it needed changing too. The rest of the docs seem to pick up the new coupon ok now. 2023-02-07 19:14:36 -05:00
PySimpleGUI
199901cc4c
Merge pull request #6214 from PySimpleGUI/Dev-latest
Dev latest
2023-02-07 18:33:00 -05:00
PySimpleGUI
800decc53f Update PySimpleGUI.py 2023-02-07 18:32:44 -05:00
PySimpleGUI
e047ffe684 New Udemy Coupon Code 2023-02-07 18:32:38 -05:00
PySimpleGUI
83bb20ff3d
Merge pull request #6212 from PySimpleGUI/Dev-latest
New Demo Program Custom Images Dark Theme
2023-02-07 11:37:18 -05:00
PySimpleGUI
517262690f New Demo Program Custom Images Dark Theme 2023-02-07 11:37:05 -05:00
PySimpleGUI
d84cd10c04
Merge pull request #6211 from PySimpleGUI/Dev-latest
And updated version of the "Edit Me" right menu design pattern
2023-02-07 07:17:24 -05:00
PySimpleGUI
f3270e00ec And updated version of the "Edit Me" right menu design pattern 2023-02-07 07:17:07 -05:00
PySimpleGUI
336d3baeb9
Merge pull request #6209 from PySimpleGUI/Dev-latest
Fixed typo in docstring
2023-02-06 11:44:07 -05:00
PySimpleGUI
7da029ebf8 Fixed typo in docstring 2023-02-06 11:43:54 -05:00
PySimpleGUI
85e11e88b7
Merge pull request #6205 from PySimpleGUI/Dev-latest
Hacked the version numbering (again... sorry!) to try to mediate the …
2023-02-05 06:30:26 -05:00
PySimpleGUI
078fc3b1d4 Hacked the version numbering (again... sorry!) to try to mediate the confusion about what's posted to PyPI. 2023-02-05 06:16:23 -05:00
PySimpleGUI
71d1c850f8
Merge pull request #6203 from PySimpleGUI/Dev-latest
New Demo Program - automatically save and load Input element values u…
2023-02-04 17:45:43 -05:00
PySimpleGUI
e764cc07b8 New Demo Program - automatically save and load Input element values using User Settings API 2023-02-04 17:45:33 -05:00
PySimpleGUI
2af2d59c4d Automated Update! 2023-01-30 18:30:24 +00:00
PySimpleGUI
16aea9c37f Automated Update! 2023-01-29 18:30:26 +00:00
PySimpleGUI
5b0f6950a3 Automated Update! 2023-01-28 18:30:26 +00:00
PySimpleGUI
81abea7164
Merge pull request #6190 from PySimpleGUI/Dev-latest
Error handling  for when no editor has been configured
2023-01-25 07:58:05 -05:00
PySimpleGUI
de383504e0 Error handling for when no editor has been configured 2023-01-25 07:57:50 -05:00
PySimpleGUI
2d9a91911b
Merge pull request #6183 from PySimpleGUI/Dev-latest
Get the latest doctrings and post to the online documentation in the …
2023-01-22 10:24:11 -05:00
PySimpleGUI
cef6e8e0cd Get the latest doctrings and post to the online documentation in the call reference 2023-01-22 10:23:55 -05:00
PySimpleGUI
58e2e936a3
Merge pull request #6182 from PySimpleGUI/Dev-latest
Fixed bind_return_key docstrings in the pre-defined buttons. Made the…
2023-01-22 10:12:05 -05:00
PySimpleGUI
de3beca51a Fixed bind_return_key docstrings in the pre-defined buttons. Made the Button bind_return_key docstring more descriptive 2023-01-22 10:11:51 -05:00
PySimpleGUI
84024bc302
Merge pull request #6180 from PySimpleGUI/Dev-latest
Added selected_text_color and selected_background_color to Multline e…
2023-01-21 15:09:00 -05:00
PySimpleGUI
2492b2353d Added selected_text_color and selected_background_color to Multline element 2023-01-21 15:08:45 -05:00
PySimpleGUI
6762f9c395
Merge pull request #6178 from PySimpleGUI/Dev-latest
Fixed bug in Combo.update - width wasn't getting updated to match new…
2023-01-20 17:55:06 -05:00
PySimpleGUI
7e88e04cee Fixed bug in Combo.update - width wasn't getting updated to match new values 2023-01-20 17:54:50 -05:00
PySimpleGUI
0e9442353c
Merge pull request #6172 from PySimpleGUI/Dev-latest
Added selected_text_color & selected_background_color to Input elemen…
2023-01-18 14:14:05 -05:00
PySimpleGUI
59cbf63116 Added selected_text_color & selected_background_color to Input element as an experiment 2023-01-18 14:13:43 -05:00
PySimpleGUI
ed8d867e76
Merge pull request #6169 from PySimpleGUI/Dev-latest
Made the Debugger's use of popups change the theme to the same dark g…
2023-01-15 10:39:45 -05:00
PySimpleGUI
4ca5cf084a Made the Debugger's use of popups change the theme to the same dark gray theme used in the rest of the debugger windows. Fixed bug introduced when constants were moved into the class. 2023-01-15 10:39:30 -05:00
PySimpleGUI
edbc55262b
Merge pull request #6167 from PySimpleGUI/Dev-latest
Get the latest docstrings from PySimpleGUI on github so that the SDK …
2023-01-13 14:30:47 -05:00
PySimpleGUI
805727fed9 Get the latest docstrings from PySimpleGUI on github so that the SDK docs online match. 2023-01-13 14:30:33 -05:00
PySimpleGUI
8effae33f4
Merge pull request #6166 from PySimpleGUI/Dev-latest
Experimental change to Table.get.  Using the tkinter widget's selecti…
2023-01-13 12:02:09 -05:00
PySimpleGUI
6a64f8cfd2 Experimental change to Table.get. Using the tkinter widget's selection method. Looks like it could work. 2023-01-13 12:01:52 -05:00
PySimpleGUI
6b20da8c59
Merge pull request #6164 from PySimpleGUI/Dev-latest
Moved debugger constants to sinde of the debugger class. Simplified t…
2023-01-12 21:06:44 -05:00
PySimpleGUI
529c285489 Moved debugger constants to sinde of the debugger class. Simplified the locals and globals popups. 2023-01-12 21:06:16 -05:00
PySimpleGUI
ad78b3b1ac
Merge pull request #6162 from PySimpleGUI/Dev-latest
Added begin_at_sunday_plus to the docstring for CalendarButton
2023-01-12 13:37:56 -05:00
PySimpleGUI
81c16c6b5f Added begin_at_sunday_plus to the docstring for CalendarButton 2023-01-12 13:37:32 -05:00
PySimpleGUI
d03347d39c
Merge pull request #6161 from PySimpleGUI/Dev-latest
Disables "Take me to error" button if no editor is configured
2023-01-12 06:23:48 -05:00
PySimpleGUI
b216a25480 Disables "Take me to error" button if no editor is configured 2023-01-12 06:23:28 -05:00
PySimpleGUI
81127fae93
Merge pull request #6160 from PySimpleGUI/Dev-latest
Tree element - if no headings are specified (set to None) then the he…
2023-01-12 06:11:26 -05:00
PySimpleGUI
d0c558f5c8 Tree element - if no headings are specified (set to None) then the header will not be added 2023-01-12 06:11:05 -05:00
PySimpleGUI
73fa593c25
Merge pull request #6153 from PySimpleGUI/Dev-latest
Demo Program - Time Chooser (ONE more time!)
2023-01-06 16:12:54 -05:00
PySimpleGUI
d9e42ed2e7 Demo Program - Time Chooser (ONE more time!) 2023-01-06 16:12:40 -05:00
PySimpleGUI
ca0e825e88
Merge pull request #6152 from PySimpleGUI/Dev-latest
Delete Demo_Time_Chooser.py
2023-01-06 16:11:55 -05:00
PySimpleGUI
2821880b3c
Delete Demo_Time_Chooser.py 2023-01-06 16:11:28 -05:00
PySimpleGUI
3ca7703fcd
Merge pull request #6151 from PySimpleGUI/Dev-latest
Dev latest
2023-01-06 16:09:59 -05:00
PySimpleGUI
c8d01725f1 Demo Program - Time Chooser 2023-01-06 16:09:39 -05:00
PySimpleGUI
7fdee8f91b
Delete Demo_Time_Chooser.py 2023-01-06 16:08:54 -05:00
PySimpleGUI
268686635f
Merge pull request #6150 from PySimpleGUI/Dev-latest
Dev latest
2023-01-06 16:04:51 -05:00
PySimpleGUI
0c77b57659 Demo Program - Time chooser 2023-01-06 16:04:33 -05:00
PySimpleGUI
a309549dbb
Merge pull request #6149 from PySimpleGUI/revert-6146-Dev-latest
Revert "Demo program of an example window to choose a time"
2023-01-06 16:03:42 -05:00
PySimpleGUI
02f3ae25be Revert "Demo program of an example window to choose a time"
This reverts commit 86976f50c3.
2023-01-06 16:02:08 -05:00
PySimpleGUI
c3a6db921f Revert "Added option to enable/disable manual entry"
This reverts commit 73a6629045.
2023-01-06 16:01:52 -05:00
44 changed files with 3640 additions and 1032 deletions

View file

@ -61,6 +61,7 @@ These items may solve your problem. Please check those you've done by changing -
- [ ] Searched main docs for your problem www.PySimpleGUI.org - [ ] Searched main docs for your problem www.PySimpleGUI.org
- [ ] Looked for Demo Programs that are similar to your goal. It is recommend you use the Demo Browser! Demos.PySimpleGUI.org - [ ] Looked for Demo Programs that are similar to your goal. It is recommend you use the Demo Browser! Demos.PySimpleGUI.org
- [ ] None of your GUI code was generated by an AI algorithm like GPT
- [ ] If not tkinter - looked for Demo Programs for specific port - [ ] If not tkinter - looked for Demo Programs for specific port
- [ ] For non tkinter - Looked at readme for your specific port if not PySimpleGUI (Qt, WX, Remi) - [ ] For non tkinter - Looked at readme for your specific port if not PySimpleGUI (Qt, WX, Remi)
- [ ] Run your program outside of your debugger (from a command line) - [ ] Run your program outside of your debugger (from a command line)

View file

@ -5,7 +5,7 @@ import warnings
import PySimpleGUI as sg import PySimpleGUI as sg
__version__ = '1.12.0' __version__ = '1.12.2'
""" """
PySimpleGUI Demo Program Browser PySimpleGUI Demo Program Browser
@ -36,7 +36,7 @@ __version__ = '1.12.0'
Versions: Versions:
1.8.0 - Addition of option to show ALL file types, not just Python files 1.8.0 - Addition of option to show ALL file types, not just Python files
1.12.0 - Fix for problem with spaces in filename and using an editor specified in the demo program settings 1.12.0 - Fix for problem with spaces in filename and using an editor specified in the demo program settings
1.12.2 - Better error handling for no editor configured
Copyright 2021, 2022 PySimpleGUI.org Copyright 2021, 2022 PySimpleGUI.org
""" """
@ -577,7 +577,9 @@ def main():
sg.cprint(f'Editing using {editor_program}', c='white on red', end='') sg.cprint(f'Editing using {editor_program}', c='white on red', end='')
sg.cprint('') sg.cprint('')
sg.cprint(f'{full_filename}', c='white on purple') sg.cprint(f'{full_filename}', c='white on purple')
# if line != 1: if not get_editor():
sg.popup_error_with_traceback('No editor has been configured', 'You need to configure an editor in order to use this feature', 'You can configure the editor in the Demo Brower Settings or the PySimpleGUI Global Settings')
else:
if using_local_editor(): if using_local_editor():
sg.execute_command_subprocess(editor_program, f'"{full_filename}"') sg.execute_command_subprocess(editor_program, f'"{full_filename}"')
else: else:
@ -585,8 +587,6 @@ def main():
sg.execute_editor(full_filename, line_number=int(line)) sg.execute_editor(full_filename, line_number=int(line))
except: except:
sg.execute_command_subprocess(editor_program, f'"{full_filename}"') sg.execute_command_subprocess(editor_program, f'"{full_filename}"')
# else:
# sg.execute_editor(full_filename)
else: else:
sg.cprint('Editing canceled') sg.cprint('Editing canceled')
elif event == 'Run': elif event == 'Run':

View file

@ -11,7 +11,7 @@
Displays the values dictionary entry for each element Displays the values dictionary entry for each element
And more! And more!
Copyright 2021, 2022 PySimpleGUI Copyright 2021, 2022, 2023 PySimpleGUI
""" """
import PySimpleGUI as sg import PySimpleGUI as sg
@ -99,7 +99,6 @@ def main():
while True: while True:
event, values = window.read(timeout=100) event, values = window.read(timeout=100)
# keep an animation running so show things are happening # keep an animation running so show things are happening
window['-GIF-IMAGE-'].update_animation(sg.DEFAULT_BASE64_LOADING_GIF, time_between_frames=100)
if event not in (sg.TIMEOUT_EVENT, sg.WIN_CLOSED): if event not in (sg.TIMEOUT_EVENT, sg.WIN_CLOSED):
print('============ Event = ', event, ' ==============') print('============ Event = ', event, ' ==============')
print('-------- Values Dictionary (key=value) --------') print('-------- Values Dictionary (key=value) --------')
@ -108,7 +107,9 @@ def main():
if event in (None, 'Exit'): if event in (None, 'Exit'):
print("[LOG] Clicked Exit!") print("[LOG] Clicked Exit!")
break break
elif event == 'About':
window['-GIF-IMAGE-'].update_animation(sg.DEFAULT_BASE64_LOADING_GIF, time_between_frames=100)
if event == 'About':
print("[LOG] Clicked About!") print("[LOG] Clicked About!")
sg.popup('PySimpleGUI Demo All Elements', sg.popup('PySimpleGUI Demo All Elements',
'Right click anywhere to see right click menu', 'Right click anywhere to see right click menu',

View file

@ -26,7 +26,7 @@ def resize_base64_image(image64, size):
''' '''
image_file = io.BytesIO(base64.b64decode(image64)) image_file = io.BytesIO(base64.b64decode(image64))
img = Image.open(image_file) img = Image.open(image_file)
img.thumbnail(size, Image.ANTIALIAS) img.thumbnail(size, Image.LANCZOS)
bio = io.BytesIO() bio = io.BytesIO()
img.save(bio, format='PNG') img.save(bio, format='PNG')
imgbytes = bio.getvalue() imgbytes = bio.getvalue()

View file

@ -4,24 +4,27 @@ import PySimpleGUI as sg
''' '''
A simple send/response chat window. Add call to your send-routine and print the response A simple send/response chat window. Add call to your send-routine and print the response
If async responses can come in, then will need to use a different design that uses PySimpleGUI async design pattern If async responses can come in, then will need to use a different design that uses PySimpleGUI async design pattern
Copyright 2023 PySimpleGUI
''' '''
sg.theme('GreenTan') # give our window a spiffy set of colors sg.theme('GreenTan') # give our window a spiffy set of colors
layout = [[sg.Text('Your output will go here', size=(40, 1))], layout = [[sg.Text('Your output will go here', size=(40, 1))],
[sg.Output(size=(110, 20), font=('Helvetica 10'))], [sg.Output(size=(110, 20), font=('Helvetica 10'))],
[sg.Multiline(size=(70, 5), enter_submits=False, key='-QUERY-', do_not_clear=False), [sg.Multiline(size=(70, 5), enter_submits=True, key='-QUERY-', do_not_clear=False),
sg.Button('SEND', button_color=(sg.YELLOWS[0], sg.BLUES[0]), bind_return_key=True), sg.Button('SEND', button_color=(sg.YELLOWS[0], sg.BLUES[0]), bind_return_key=True),
sg.Button('EXIT', button_color=(sg.YELLOWS[0], sg.GREENS[0]))]] sg.Button('EXIT', button_color=(sg.YELLOWS[0], sg.GREENS[0]))]]
window = sg.Window('Chat window', layout, font=('Helvetica', ' 13'), default_button_element_size=(8,2), use_default_focus=False) window = sg.Window('Chat window', layout, font=('Helvetica', ' 13'), default_button_element_size=(8,2), use_default_focus=False)
while True: # The Event Loop while True: # The Event Loop
event, value = window.read() event, values = window.read()
if event in (sg.WIN_CLOSED, 'EXIT'): # quit if exit button or X if event in (sg.WIN_CLOSED, 'EXIT'): # quit if exit button or X
break break
if event == 'SEND': if event == 'SEND':
query = value['-QUERY-'].rstrip() query = values['-QUERY-'].rstrip()
# EXECUTE YOUR COMMAND HERE # EXECUTE YOUR COMMAND HERE
print('The command you entered was {}'.format(query), flush=True) print('The command you entered was {}'.format(query), flush=True)

View file

@ -5,9 +5,37 @@ import PySimpleGUI as sg
Using a class to encapsulate PySimpleGUI Window creation & event loop Using a class to encapsulate PySimpleGUI Window creation & event loop
Copyright 2022 PySimpleGUI This is NOT a recommended design pattern. It mimics the object oriented design that many OO-based
GUI frameworks use, but there is no advantage to structuring you code in his manner. It adds
confusion, not clarity.
The class version is 18 lines of code. The plain version is 13 lines of code.
Two things about the class wrapper jump out as adding confusion:
1. Unneccessary fragmentation of the event loop - the button click code is pulled out of the loop entirely
2. "self" clutters the code without adding value
Copyright 2022, 2023 PySimpleGUI
""" """
'''
MM'""""'YMM dP
M' .mmm. `M 88
M MMMMMooM 88 .d8888b. .d8888b. .d8888b.
M MMMMMMMM 88 88' `88 Y8ooooo. Y8ooooo.
M. `MMM' .M 88 88. .88 88 88
MM. .dM dP `88888P8 `88888P' `88888P'
MMMMMMMMMMM
M""MMMMM""M oo
M MMMMM M
M MMMMP M .d8888b. 88d888b. .d8888b. dP .d8888b. 88d888b.
M MMMM' .M 88ooood8 88' `88 Y8ooooo. 88 88' `88 88' `88
M MMP' .MM 88. ... 88 88 88 88. .88 88 88
M .dMMM `88888P' dP `88888P' dP `88888P' dP dP
MMMMMMMMMMM
'''
class SampleGUI(): class SampleGUI():
def __init__(self): def __init__(self):
@ -35,3 +63,41 @@ class SampleGUI():
my_gui = SampleGUI() my_gui = SampleGUI()
# run the event loop # run the event loop
my_gui.run() my_gui.run()
'''
M"""""""`YM dP
M mmmm. M 88
M MMMMM M .d8888b. 88d888b. 88d8b.d8b. .d8888b. 88
M MMMMM M 88' `88 88' `88 88'`88'`88 88' `88 88
M MMMMM M 88. .88 88 88 88 88 88. .88 88
M MMMMM M `88888P' dP dP dP dP `88888P8 dP
MMMMMMMMMMM
M""MMMMM""M oo
M MMMMM M
M MMMMP M .d8888b. 88d888b. .d8888b. dP .d8888b. 88d888b.
M MMMM' .M 88ooood8 88' `88 Y8ooooo. 88 88' `88 88' `88
M MMP' .MM 88. ... 88 88 88 88. .88 88 88
M .dMMM `88888P' dP `88888P' dP `88888P' dP dP
MMMMMMMMMMM
'''
def gui_function():
layout = [ [sg.Text('My layout')],
[sg.Input(key='-IN-')],
[sg.Button('Go'), sg.Button('Exit')] ]
window = sg.Window('My new window', layout)
while True: # Event Loop
event, values = window.read()
if event in (sg.WIN_CLOSED, 'Exit'):
break
if event == 'Go':
sg.popup('Go button clicked', 'Input value:', values['-IN-'])
window.close()
gui_function()

View file

@ -1,8 +1,12 @@
import PySimpleGUI as sg import PySimpleGUI as sg
import datetime import datetime
import PIL.Image, PIL.ImageTk import PIL
from PIL import Image
import random import random
import os import os
import io
import base64
""" """
Another simple Desktop Widget using PySimpleGUI Another simple Desktop Widget using PySimpleGUI
@ -16,17 +20,76 @@ import os
* How long to show the image and if you wnt this time to vary semi-randomly * How long to show the image and if you wnt this time to vary semi-randomly
* Folder containing your images * Folder containing your images
Copyright 2021 PySimpleGUI Copyright 2021, 2023 PySimpleGUI
""" """
ALPHA = 0.9 # Initial alpha until user changes ALPHA = 0.9 # Initial alpha until user changes
refresh_font = sg.user_settings_get_entry('-refresh font-', 'Courier 8') refresh_font = sg.user_settings_get_entry('-refresh font-', 'Courier 8')
def convert_to_bytes(file_or_bytes, resize=None):
image = PIL.Image.open(file_or_bytes) def make_square(im, fill_color=(0, 0, 0, 0)):
image.thumbnail(resize) x, y = im.size
photo_img = PIL.ImageTk.PhotoImage(image) size = max(x, y)
return photo_img new_im = Image.new('RGBA', (size, size), fill_color)
new_im.paste(im, (int((size - x) / 2), int((size - y) / 2)))
return new_im
def get_image_size(source):
if isinstance(source, str):
image = PIL.Image.open(source)
elif isinstance(source, bytes):
image = PIL.Image.open(io.BytesIO(base64.b64decode(source)))
else:
image = PIL.Image.open(io.BytesIO(source))
width, height = image.size
return (width, height)
def convert_to_bytes(source, size=(None, None), subsample=None, zoom=None, fill=False):
"""
Will convert into bytes and optionally resize an image that is a file or a base64 bytes object.
Turns into PNG format in the process so that can be displayed by tkinter
:param source: either a string filename or a bytes base64 image object
:type source: (Union[str, bytes])
:param size: optional new size (width, height)
:type size: (Tuple[int, int] or None)
:param subsample: change the size by multiplying width and height by 1/subsample
:type subsample: (int)
:param zoom: change the size by multiplying width and height by zoom
:type zoom: (int)
:param fill: If True then the image is filled/padded so that the image is square
:type fill: (bool)
:return: (bytes) a byte-string object
:rtype: (bytes)
"""
# print(f'converting {source} {size}')
if isinstance(source, str):
image = PIL.Image.open(source)
elif isinstance(source, bytes):
image = PIL.Image.open(io.BytesIO(base64.b64decode(source)))
else:
image = PIL.Image.open(io.BytesIO(source))
width, height = image.size
scale = None
if size != (None, None):
new_width, new_height = size
scale = min(new_height/height, new_width/width)
elif subsample is not None:
scale = 1/subsample
elif zoom is not None:
scale = zoom
resized_image = image.resize((int(width * scale), int(height * scale)), Image.LANCZOS) if scale is not None else image
if fill and scale is not None:
resized_image = make_square(resized_image)
# encode a PNG formatted version of image into BASE64
with io.BytesIO() as bio:
resized_image.save(bio, format="PNG")
contents = bio.getvalue()
encoded = base64.b64encode(contents)
return encoded
def choose_theme(location): def choose_theme(location):
@ -43,6 +106,15 @@ def choose_theme(location):
else: else:
return None return None
def reset_settings():
sg.user_settings_set_entry('-time per image-', 60)
sg.user_settings_set_entry('-random time-', False)
sg.user_settings_set_entry('-image size-', (None, None))
sg.user_settings_set_entry('-image_folder-', None)
sg.user_settings_set_entry('-location-', (None, None))
sg.user_settings_set_entry('-single image-', None)
sg.user_settings_set_entry('-alpha-', ALPHA)
def make_window(location): def make_window(location):
alpha = sg.user_settings_get_entry('-alpha-', ALPHA) alpha = sg.user_settings_get_entry('-alpha-', ALPHA)
@ -61,7 +133,7 @@ def make_window(location):
layout = [[sg.Image(k='-IMAGE-', enable_events=True)], layout = [[sg.Image(k='-IMAGE-', enable_events=True)],
[sg.pin(sg.Column(refresh_info, key='-REFRESH INFO-', element_justification='c', visible=sg.user_settings_get_entry('-show refresh-', True)))]] [sg.pin(sg.Column(refresh_info, key='-REFRESH INFO-', element_justification='c', visible=sg.user_settings_get_entry('-show refresh-', True)))]]
window = sg.Window('Photo Frame', layout, location=location, no_titlebar=True, grab_anywhere=True, margins=(0, 0), element_justification='c', element_padding=(0, 0), alpha_channel=alpha, finalize=True, right_click_menu=right_click_menu, keep_on_top=True, enable_close_attempted_event=True) window = sg.Window('Photo Frame', layout, location=location, no_titlebar=True, grab_anywhere=True, margins=(0, 0), element_justification='c', element_padding=(0, 0), alpha_channel=alpha, finalize=True, right_click_menu=right_click_menu, keep_on_top=True, enable_close_attempted_event=True, enable_window_config_events=True)
return window return window
@ -69,11 +141,10 @@ def make_window(location):
def main(): def main():
loc = sg.user_settings_get_entry('-location-', (None, None)) loc = sg.user_settings_get_entry('-location-', (None, None))
sg.theme(sg.user_settings_get_entry('-theme-', None)) sg.theme(sg.user_settings_get_entry('-theme-', None))
window = make_window(loc)
time_per_image = sg.user_settings_get_entry('-time per image-', 60) time_per_image = sg.user_settings_get_entry('-time per image-', 60)
vary_randomly = sg.user_settings_get_entry('-random time-', False) vary_randomly = sg.user_settings_get_entry('-random time-', False)
width, height = sg.user_settings_get_entry('-image size-', (400,300)) width, height = sg.user_settings_get_entry('-image size-', (None, None))
image_folder = sg.user_settings_get_entry('-image_folder-', None) image_folder = sg.user_settings_get_entry('-image_folder-', None)
try: try:
@ -82,36 +153,26 @@ def main():
image_folder = None image_folder = None
sg.user_settings_set_entry('-image_folder-', None) sg.user_settings_set_entry('-image_folder-', None)
single_image = sg.user_settings_get_entry('-single image-', None) image_name = single_image = sg.user_settings_get_entry('-single image-', None)
if image_folder is None and single_image is None: if image_folder is None and single_image is None:
while True: image_name = single_image = sg.popup_get_file('Choose a starting image', keep_on_top=True)
images = None if not single_image:
image_folder = sg.popup_get_folder('Choose location of your images', location=window.current_location(), keep_on_top=True)
if image_folder is not None:
sg.user_settings_set_entry('-image_folder-', image_folder)
break
else:
if sg.popup_yes_no('No folder entered','Go you want to exit the program entirely?', keep_on_top=True) == 'Yes': if sg.popup_yes_no('No folder entered','Go you want to exit the program entirely?', keep_on_top=True) == 'Yes':
exit() exit()
elif single_image is None: if image_folder is not None and single_image is None:
images = os.listdir(image_folder) images = os.listdir(image_folder)
images = [i for i in images if i.lower().endswith(('.png', '.jpg', '.gif'))] images = [i for i in images if i.lower().endswith(('.png', '.jpg', '.gif'))]
image_name = os.path.join(image_folder, random.choice(images))
else: # means single image is not none else: # means single image is not none
images = None images = None
while True: # Event Loop
# First update the status information
# for debugging show the last update date time
if single_image is None:
image_name =random.choice(images)
image_data = convert_to_bytes(os.path.join(image_folder, image_name), (width, height))
window['-FOLDER-'].update(image_folder)
else:
image_name = single_image image_name = single_image
image_data = convert_to_bytes(single_image, (width, height)) window = make_window(loc)
window['-FILENAME-'].update(image_name)
window['-IMAGE-'].update(data=image_data) window_size = window.size
window['-REFRESHED-'].update(datetime.datetime.now().strftime("%m/%d/%Y %I:%M:%S %p")) image_data = convert_to_bytes(image_name, (width, height))
while True: # Event Loop
# -------------- Start of normal event loop -------------- # -------------- Start of normal event loop --------------
timeout = time_per_image * 1000 + (random.randint(int(-time_per_image * 500), int(time_per_image * 500)) if vary_randomly else 0) if single_image is None else None timeout = time_per_image * 1000 + (random.randint(int(-time_per_image * 500), int(time_per_image * 500)) if vary_randomly else 0) if single_image is None else None
event, values = window.read(timeout=timeout) event, values = window.read(timeout=timeout)
@ -120,6 +181,28 @@ def main():
elif event in (sg.WIN_CLOSE_ATTEMPTED_EVENT, 'Exit'): elif event in (sg.WIN_CLOSE_ATTEMPTED_EVENT, 'Exit'):
sg.user_settings_set_entry('-location-', window.current_location()) # The line of code to save the position before exiting sg.user_settings_set_entry('-location-', window.current_location()) # The line of code to save the position before exiting
break break
# First update the status information
# for debugging show the last update date time
if event == sg.TIMEOUT_EVENT:
if single_image is None:
image_name =random.choice(images)
image_data = convert_to_bytes(os.path.join(image_folder, image_name))
window['-FOLDER-'].update(image_folder)
else:
image_name = single_image
image_data = convert_to_bytes(single_image, (width, height))
window['-FILENAME-'].update(image_name)
window['-IMAGE-'].update(data=image_data)
window['-REFRESHED-'].update(datetime.datetime.now().strftime("%m/%d/%Y %I:%M:%S %p"))
if event == sg.WINDOW_CONFIG_EVENT:
new_size = window.size
if new_size != window_size:
print(f'resizing {new_size}')
(width, height) = new_size
image_data = convert_to_bytes(image_data, (width, height))
window['-IMAGE-'].update(data=image_data)
window.size = get_image_size(image_data)
window_size = window.size
if event == 'Edit Me': if event == 'Edit Me':
sg.execute_editor(__file__) sg.execute_editor(__file__)
elif event == 'Choose Image Folder': elif event == 'Choose Image Folder':
@ -175,12 +258,15 @@ def main():
window.close() window.close()
window = make_window(loc) window = make_window(loc)
elif event == 'Choose Single Image': elif event == 'Choose Single Image':
single_image = sg.popup_get_file('Choose single image to show', history=True) image_name = single_image = sg.popup_get_file('Choose single image to show', history=True)
sg.user_settings_set_entry('-single image-', single_image) sg.user_settings_set_entry('-single image-', single_image)
(width, height) = get_image_size(single_image)
sg.user_settings_set_entry('-image size-', (width, height))
image_data = convert_to_bytes(image_name, (width, height))
window['-IMAGE-'].update(data=image_data)
window.size = window_size = (width, height)
window.close() window.close()
if __name__ == '__main__': if __name__ == '__main__':
# reset_settings() # if get corrupted problems, uncomment this
main() main()

View file

@ -12,6 +12,7 @@
* If-Else * If-Else
* Dictionaries * Dictionaries
* Functions as keys * Functions as keys
* Lambda as key (callable like functions are)
The handlers in this demo are all functions that are called once the event is detected The handlers in this demo are all functions that are called once the event is detected
@ -22,7 +23,7 @@
event loop rather than functions, then do it in the event loop. event loop rather than functions, then do it in the event loop.
http://www.PySimpleGUI.org http://www.PySimpleGUI.org
Copyright 2021 PySimpleGUI Copyright 2021, 2022, 2023 PySimpleGUI
""" """
import PySimpleGUI as sg import PySimpleGUI as sg
@ -76,7 +77,7 @@ def main():
[sg.Text('Status:'), sg.Text(size=(3, 1), key='-STATUS-')], [sg.Text('Status:'), sg.Text(size=(3, 1), key='-STATUS-')],
[sg.Text(size=(50, 1), key='-OUT-')], [sg.Text(size=(50, 1), key='-OUT-')],
[sg.Button('Simple'), sg.Button('Go'), sg.Button('Stop'), sg.Button('Other', key=do_other), [sg.Button('Simple'), sg.Button('Go'), sg.Button('Stop'), sg.Button('Other', key=do_other),
sg.Button('Tuple', key=(1,2)), sg.Button('Bad')]] sg.Button('Tuple', key=(1,2)), sg.Button('Lambda', key= lambda window: do_other(window)), sg.Button('Bad')]]
window = sg.Window('Dispatchers', layout, font='Default 16', keep_on_top=True) window = sg.Window('Dispatchers', layout, font='Default 16', keep_on_top=True)

View file

@ -1,7 +1,7 @@
import PySimpleGUI as sg import PySimpleGUI as sg
""" """
Demo "Edit Me" Demo "Edit Me" (and Version)
More and more of these Demos are getting an "Edit me" option added. More and more of these Demos are getting an "Edit me" option added.
@ -12,20 +12,18 @@ import PySimpleGUI as sg
You can add this capability to your program by adding a right click menu to your window and calling the You can add this capability to your program by adding a right click menu to your window and calling the
editor that you set up in the global PySimpleGUI options. editor that you set up in the global PySimpleGUI options.
You need to do 2 things to make this work: A constant MENU_RIGHT_CLICK_EDITME_VER_EXIT, when set at the right click menu shows a "Version" and "Edit Me" meny item.
1. Add a right click menu - requires you to add 1 parameter to your Window creation
2. Add 1 if statement to your event loop.
You will need to have first set up your editor by using the menu in sg.main() You will need to have first set up your editor by using the menu in sg.main()
Copyright 2021 PySimpleGUI.org Copyright 2021, 2022, 2023 PySimpleGUI.org
""" """
layout = [[sg.Text('Edit this program by right clicking and choosing "Edit me"')], layout = [[sg.Text('Edit this program by right clicking and choosing "Edit me"')],
[sg.Button('Exit')]] [sg.Button('Exit')]]
window = sg.Window('Edit Me Right Click Menu Demo', layout, right_click_menu=[[''], ['Edit Me', 'Exit',]]) window = sg.Window('Edit Me Right Click Menu Demo', layout, right_click_menu=sg.MENU_RIGHT_CLICK_EDITME_VER_EXIT)
while True: # Event Loop while True: # Event Loop
event, values = window.read() event, values = window.read()
@ -33,5 +31,7 @@ while True: # Event Loop
break break
if event == 'Edit Me': if event == 'Edit Me':
sg.execute_editor(__file__) sg.execute_editor(__file__)
elif event == 'Version':
sg.popup_scrolled(__file__, sg.get_versions(), location=window.current_location(), keep_on_top=True, non_blocking=True)
window.close() window.close()

View file

@ -92,7 +92,7 @@ def convert_to_bytes(file_or_bytes, resize=None, fill=False):
if resize: if resize:
new_width, new_height = resize new_width, new_height = resize
scale = min(new_height / cur_height, new_width / cur_width) scale = min(new_height / cur_height, new_width / cur_width)
img = img.resize((int(cur_width * scale), int(cur_height * scale)), PIL.Image.ANTIALIAS) img = img.resize((int(cur_width * scale), int(cur_height * scale)), PIL.Image.LANCZOS)
if fill: if fill:
if resize is not None: if resize is not None:
img = make_square(img, resize[0]) img = make_square(img, resize[0])

View file

@ -1,5 +1,4 @@
import PySimpleGUI as sg import PySimpleGUI as sg
from PIL import ImageGrab
""" """
Demo - Drawing and moving demo Demo - Drawing and moving demo
@ -7,22 +6,9 @@ from PIL import ImageGrab
This demo shows how to use a Graph Element to (optionally) display an image and then use the This demo shows how to use a Graph Element to (optionally) display an image and then use the
mouse to "drag" and draw rectangles and circles. mouse to "drag" and draw rectangles and circles.
Copyright 2020 PySimpleGUI.org Copyright 2020, 2021, 2022, 2023 PySimpleGUI.org
""" """
def save_element_as_file(element, filename):
"""
Saves any element as an image file. Element needs to have an underlyiong Widget available (almost if not all of them do)
:param element: The element to save
:param filename: The filename to save to. The extension of the filename determines the format (jpg, png, gif, ?)
"""
widget = element.Widget
box = (widget.winfo_rootx(), widget.winfo_rooty(), widget.winfo_rootx() + widget.winfo_width(), widget.winfo_rooty() + widget.winfo_height())
grab = ImageGrab.grab(bbox=box)
grab.save(filename)
def main(): def main():
sg.theme('Dark Blue 3') sg.theme('Dark Blue 3')
@ -38,7 +24,6 @@ def main():
[sg.R('Bring to front', 1, key='-FRONT-', enable_events=True)], [sg.R('Bring to front', 1, key='-FRONT-', enable_events=True)],
[sg.R('Move Everything', 1, key='-MOVEALL-', enable_events=True)], [sg.R('Move Everything', 1, key='-MOVEALL-', enable_events=True)],
[sg.R('Move Stuff', 1, key='-MOVE-', enable_events=True)], [sg.R('Move Stuff', 1, key='-MOVE-', enable_events=True)],
[sg.B('Save Image', key='-SAVE-')],
] ]
layout = [[sg.Graph( layout = [[sg.Graph(
@ -49,7 +34,8 @@ def main():
enable_events=True, enable_events=True,
background_color='lightblue', background_color='lightblue',
drag_submits=True, drag_submits=True,
right_click_menu=[[],['Erase item',]] motion_events=True,
right_click_menu=[[''],['Erase item','Send to back']]
), sg.Col(col, key='-COL-') ], ), sg.Col(col, key='-COL-') ],
[sg.Text(key='-INFO-', size=(60, 1))]] [sg.Text(key='-INFO-', size=(60, 1))]]
@ -58,11 +44,9 @@ def main():
# get the graph element for ease of use later # get the graph element for ease of use later
graph = window["-GRAPH-"] # type: sg.Graph graph = window["-GRAPH-"] # type: sg.Graph
graph.draw_image(data=logo200, location=(0,400)) graph.draw_image(data=logo200, location=(0,400))
dragging = False dragging = False
start_point = end_point = prior_rect = None start_point = end_point = prior_rect = None
# graph.bind('<Button-3>', '+RIGHT+') crosshair_lines = []
while True: while True:
event, values = window.read() event, values = window.read()
print(event, values) print(event, values)
@ -73,7 +57,14 @@ def main():
graph.set_cursor(cursor='fleur') # not yet released method... coming soon! graph.set_cursor(cursor='fleur') # not yet released method... coming soon!
elif not event.startswith('-GRAPH-'): elif not event.startswith('-GRAPH-'):
graph.set_cursor(cursor='left_ptr') # not yet released method... coming soon! graph.set_cursor(cursor='left_ptr') # not yet released method... coming soon!
if event.endswith('+MOVE'):
window["-INFO-"].update(value=f"mouse {values['-GRAPH-']}")
# Delete crosshairs if any exists
if len(crosshair_lines):
for fig in crosshair_lines:
graph.delete_figure(fig)
crosshair_lines = []
window.refresh()
if event == "-GRAPH-": # if there's a "Graph" event, then it's a mouse if event == "-GRAPH-": # if there's a "Graph" event, then it's a mouse
x, y = values["-GRAPH-"] x, y = values["-GRAPH-"]
if not dragging: if not dragging:
@ -119,20 +110,23 @@ def main():
start_point, end_point = None, None # enable grabbing a new rect start_point, end_point = None, None # enable grabbing a new rect
dragging = False dragging = False
prior_rect = None prior_rect = None
elif event.endswith('+RIGHT+'): # Righ click # elif event.endswith('+RIGHT+'): # Right click
window["-INFO-"].update(value=f"Right clicked location {values['-GRAPH-']}") # window["-INFO-"].update(value=f"Right clicked location {values['-GRAPH-']}")
elif event.endswith('+MOTION+'): # Righ click # elif event.endswith('+MOTION+'): # Right click
window["-INFO-"].update(value=f"mouse freely moving {values['-GRAPH-']}") # window["-INFO-"].update(value=f"mouse freely moving {values['-GRAPH-']}")
elif event == '-SAVE-': elif event == 'Send to back': # Right clicked menu item
# filename = sg.popup_get_file('Choose file (PNG, JPG, GIF) to save to', save_as=True) figures = graph.get_figures_at_location(values["-GRAPH-"]) # get items in front-to-back order
filename=r'test.jpg' if figures: # make sure at least 1 item found
save_element_as_file(window['-GRAPH-'], filename) graph.send_figure_to_back(figures[-1]) # get the last item which will be the top-most
elif event == 'Erase item': elif event == 'Erase item':
window["-INFO-"].update(value=f"Right click erase at {values['-GRAPH-']}") window["-INFO-"].update(value=f"Right click erase at {values['-GRAPH-']}")
if values['-GRAPH-'] != (None, None): if values['-GRAPH-'] != (None, None):
drag_figures = graph.get_figures_at_location(values['-GRAPH-']) figures = graph.get_figures_at_location(values['-GRAPH-'])
for figure in drag_figures: if figures:
graph.delete_figure(figure) graph.delete_figure(figures[-1]) # delete the one on top
location = values['-GRAPH-']
crosshair_lines = [graph.draw_line((location[0], 0), (location[0], 800), color='red'),
graph.draw_line((0, location[1]), (800, location[1]), color='red')]
window.close() window.close()

File diff suppressed because one or more lines are too long

View file

@ -44,7 +44,7 @@ def convert_to_bytes(file_or_bytes, resize=None):
if resize: if resize:
new_width, new_height = resize new_width, new_height = resize
scale = min(new_height/cur_height, new_width/cur_width) scale = min(new_height/cur_height, new_width/cur_width)
img = img.resize((int(cur_width*scale), int(cur_height*scale)), PIL.Image.ANTIALIAS) img = img.resize((int(cur_width*scale), int(cur_height*scale)), PIL.Image.LANCZOS)
bio = io.BytesIO() bio = io.BytesIO()
img.save(bio, format="PNG") img.save(bio, format="PNG")
del img del img

View file

@ -45,7 +45,7 @@ def convert_to_bytes(file_or_bytes, resize=None):
if resize: if resize:
new_width, new_height = resize new_width, new_height = resize
scale = min(new_height/cur_height, new_width/cur_width) scale = min(new_height/cur_height, new_width/cur_width)
img = img.resize((int(cur_width*scale), int(cur_height*scale)), PIL.Image.ANTIALIAS) img = img.resize((int(cur_width*scale), int(cur_height*scale)), PIL.Image.LANCZOS)
with io.BytesIO() as bio: with io.BytesIO() as bio:
img.save(bio, format="PNG") img.save(bio, format="PNG")
del img del img

View file

@ -55,7 +55,7 @@ def resize(input_file, size, output_file=None, encode_format='PNG'):
new_width, new_height = size new_width, new_height = size
if new_width != width or new_height != height: # if the requested size is different than original size if new_width != width or new_height != height: # if the requested size is different than original size
scale = min(new_height / height, new_width / width) scale = min(new_height / height, new_width / width)
resized_image = image.resize((int(width * scale), int(height * scale)), Image.ANTIALIAS) resized_image = image.resize((int(width * scale), int(height * scale)), Image.LANCZOS)
else: else:
resized_image = image resized_image = image

View file

@ -56,7 +56,7 @@ def convert_to_bytes(file_or_bytes, resize=None, fill=False):
if resize: if resize:
new_width, new_height = resize new_width, new_height = resize
scale = min(new_height / cur_height, new_width / cur_width) scale = min(new_height / cur_height, new_width / cur_width)
img = img.resize((int(cur_width * scale), int(cur_height * scale)), PIL.Image.ANTIALIAS) img = img.resize((int(cur_width * scale), int(cur_height * scale)), PIL.Image.LANCZOS)
if fill: if fill:
img = make_square(img, THUMBNAIL_SIZE[0]) img = make_square(img, THUMBNAIL_SIZE[0])
with io.BytesIO() as bio: with io.BytesIO() as bio:

View file

@ -22,9 +22,9 @@ import PySimpleGUI as sg
Copyright 2020, 2022 PySimpleGUI.org Copyright 2020, 2022 PySimpleGUI.org
""" """
layout = [ [sg.Text('Hide Button or Input. Button3 hides Input. Buttons 1 & 2 hide Button 2')], layout = [ [sg.Text('Hide Button or Multiline. Buttons 1 & 2 hide Button 2')],
[sg.pin(sg.Multiline(size=(60, 10), key='-MLINE-'))], [sg.pin(sg.Multiline(size=(60, 10), key='-MLINE-'))],
[sg.pin(sg.Button('Button1')), sg.pin(sg.Button('Button2'), shrink=False), sg.B('Button3'), sg.B('Toggle Multiline')], [sg.pin(sg.Button('Button1')), sg.pin(sg.Button('Button2'), shrink=False), sg.B('Toggle Multiline')],
] ]
window = sg.Window('Visible / Invisible Element Demo', layout) window = sg.Window('Visible / Invisible Element Demo', layout)
@ -39,9 +39,6 @@ while True: # Event Loop
if event in ('Button1', 'Button2'): if event in ('Button1', 'Button2'):
window['Button2'].update(visible=toggle) window['Button2'].update(visible=toggle)
toggle = not toggle toggle = not toggle
if event == 'Button3':
window['-IN-'].update(visible=toggle_in)
toggle_in = not toggle_in
elif event == 'Toggle Multiline': elif event == 'Toggle Multiline':
window['-MLINE-'].update(visible=not window['-MLINE-'].visible) window['-MLINE-'].update(visible=not window['-MLINE-'].visible)
window.close() window.close()

View file

@ -890,7 +890,7 @@ def convert_to_bytes(file_or_bytes, resize=None):
if resize: if resize:
new_width, new_height = resize new_width, new_height = resize
scale = min(new_height/cur_height, new_width/cur_width) scale = min(new_height/cur_height, new_width/cur_width)
img = img.resize((int(cur_width*scale), int(cur_height*scale)), PIL.Image.ANTIALIAS) img = img.resize((int(cur_width*scale), int(cur_height*scale)), PIL.Image.LANCZOS)
with io.BytesIO() as bio: with io.BytesIO() as bio:
img.save(bio, format="PNG") img.save(bio, format="PNG")
del img del img

View file

@ -15,7 +15,7 @@ button64 = 'iVBORw0KGgoAAAANSUhEUgAAAoAAAAFACAMAAAAbEz04AAAABGdBTUEAALGPC/xhBQAA
def image_file_to_bytes(image64, size): def image_file_to_bytes(image64, size):
image_file = io.BytesIO(base64.b64decode(image64)) image_file = io.BytesIO(base64.b64decode(image64))
img = Image.open(image_file) img = Image.open(image_file)
img.thumbnail(size, Image.ANTIALIAS) img.thumbnail(size, Image.LANCZOS)
bio = io.BytesIO() bio = io.BytesIO()
img.save(bio, format='PNG') img.save(bio, format='PNG')
imgbytes = bio.getvalue() imgbytes = bio.getvalue()

View file

@ -60,7 +60,7 @@ def convert_to_bytes(source, size=(None, None), subsample=None, zoom=None, fill=
elif zoom is not None: elif zoom is not None:
scale = zoom scale = zoom
resized_image = image.resize((int(width * scale), int(height * scale)), Image.ANTIALIAS) if scale is not None else image resized_image = image.resize((int(width * scale), int(height * scale)), Image.LANCZOS) if scale is not None else image
if fill and scale is not None: if fill and scale is not None:
resized_image = make_square(resized_image) resized_image = make_square(resized_image)
# encode a PNG formatted version of image into BASE64 # encode a PNG formatted version of image into BASE64

View file

@ -59,7 +59,7 @@ def convert_to_bytes(file_or_bytes, resize=None):
if resize: if resize:
new_width, new_height = resize new_width, new_height = resize
scale = min(new_height / cur_height, new_width / cur_width) scale = min(new_height / cur_height, new_width / cur_width)
img = img.resize((int(cur_width * scale), int(cur_height * scale)), PIL.Image.ANTIALIAS) img = img.resize((int(cur_width * scale), int(cur_height * scale)), PIL.Image.LANCZOS)
with io.BytesIO() as bio: with io.BytesIO() as bio:
img.save(bio, format="PNG") img.save(bio, format="PNG")
del img del img
@ -69,7 +69,7 @@ def convert_to_bytes(file_or_bytes, resize=None):
# def image_file_to_bytes(filename, size): # def image_file_to_bytes(filename, size):
# try: # try:
# image = Image.open(filename) # image = Image.open(filename)
# image.thumbnail(size, Image.ANTIALIAS) # image.thumbnail(size, Image.LANCZOS)
# bio = io.BytesIO() # a binary memory resident stream # bio = io.BytesIO() # a binary memory resident stream
# image.save(bio, format='PNG') # save image as png to it # image.save(bio, format='PNG') # save image as png to it
# imgbytes = bio.getvalue() # imgbytes = bio.getvalue()
@ -80,7 +80,7 @@ def convert_to_bytes(file_or_bytes, resize=None):
def set_image_to_blank(key): def set_image_to_blank(key):
img = PIL.Image.new('RGB', (100, 100), (255, 255, 255)) img = PIL.Image.new('RGB', (100, 100), (255, 255, 255))
img.thumbnail((1, 1), PIL.Image.ANTIALIAS) img.thumbnail((1, 1), PIL.Image.LANCZOS)
bio = io.BytesIO() bio = io.BytesIO()
img.save(bio, format='PNG') img.save(bio, format='PNG')
imgbytes = bio.getvalue() imgbytes = bio.getvalue()

View file

@ -2,7 +2,6 @@ import PySimpleGUI as sg, random
import numpy as np import numpy as np
from typing import List, Any, Union, Tuple, Dict from typing import List, Any, Union, Tuple, Dict
""" """
Sudoku Puzzle Demo Sudoku Puzzle Demo
@ -27,7 +26,7 @@ def generate_sudoku(mask_rate):
""" """
while True: while True:
n = 9 n = 9
solution = np.zeros((n, n), np.int) solution = np.zeros((n, n), np.int_)
rg = np.arange(1, n + 1) rg = np.arange(1, n + 1)
solution[0, :] = np.random.choice(rg, n, replace=False) solution[0, :] = np.random.choice(rg, n, replace=False)
try: try:
@ -36,10 +35,11 @@ def generate_sudoku(mask_rate):
col_rest = np.setdiff1d(rg, solution[:r, c]) col_rest = np.setdiff1d(rg, solution[:r, c])
row_rest = np.setdiff1d(rg, solution[r, :c]) row_rest = np.setdiff1d(rg, solution[r, :c])
avb1 = np.intersect1d(col_rest, row_rest) avb1 = np.intersect1d(col_rest, row_rest)
sub_r, sub_c = r//3, c//3 sub_r, sub_c = r // 3, c // 3
avb2 = np.setdiff1d(np.arange(0, n+1), solution[sub_r*3:(sub_r+1)*3, sub_c*3:(sub_c+1)*3].ravel()) avb2 = np.setdiff1d(np.arange(0, n + 1), solution[sub_r * 3:(sub_r + 1) * 3, sub_c * 3:(sub_c + 1) * 3].ravel())
avb = np.intersect1d(avb1, avb2) avb = np.intersect1d(avb1, avb2)
solution[r, c] = np.random.choice(avb, size=1) # solution[r, c] = np.random.choice(avb, size=1)
solution[r, c] = np.random.choice(avb, size=1)[0]
break break
except ValueError: except ValueError:
pass pass
@ -48,7 +48,6 @@ def generate_sudoku(mask_rate):
return puzzle, solution return puzzle, solution
def check_progress(window, solution): def check_progress(window, solution):
""" """
Gives you a visual hint on your progress. Gives you a visual hint on your progress.
@ -65,26 +64,34 @@ def check_progress(window, solution):
solved = True solved = True
for r, row in enumerate(solution): for r, row in enumerate(solution):
for c, col in enumerate(row): for c, col in enumerate(row):
value = window[r,c].get() value = window[r, c].get()
if value: if value:
try: try:
value = int(value) value = int(value)
except: except:
value = 0 value = 0
if value != solution[r][c]: if value != solution[r][c]:
window[r,c].update(background_color='red') window[r, c].update(background_color='red')
solved = False solved = False
else: else:
window[r,c].update(background_color=sg.theme_input_background_color()) window[r, c].update(background_color=sg.theme_input_background_color())
else: else:
solved = False solved = False
window[r, c].update(background_color='yellow') window[r, c].update(background_color='yellow')
return solved return solved
def create_and_show_puzzle(window): def main(mask_rate=0.7):
""""
The Main GUI - It does it all.
The "Board" is a grid that's 9 x 9. Even though the layout is a grid of 9 Frames, the
addressing of the individual squares is via a key that's a tuple (0,0) to (8,8)
"""
def create_and_show_puzzle():
# create and display a puzzle by updating the Input elements # create and display a puzzle by updating the Input elements
rate = DEFAULT_MASK_RATE rate = mask_rate
if window['-RATE-'].get(): if window['-RATE-'].get():
try: try:
rate = float(window['-RATE-'].get()) rate = float(window['-RATE-'].get())
@ -96,34 +103,24 @@ def create_and_show_puzzle(window):
window[r, c].update(puzzle[r][c] if puzzle[r][c] else '', background_color=sg.theme_input_background_color()) window[r, c].update(puzzle[r][c] if puzzle[r][c] else '', background_color=sg.theme_input_background_color())
return puzzle, solution return puzzle, solution
def main(mask_rate=0.7):
""""
The Main GUI - It does it all.
The "Board" is a grid that's 9 x 9. Even though the layout is a grid of 9 Frames, the
addressing of the individual squares is via a key that's a tuple (0,0) to (8,8)
"""
# It's 1 line of code to make a Sudoku board. If you don't like it, then replace it. # It's 1 line of code to make a Sudoku board. If you don't like it, then replace it.
# Dude (Dudette), it's 1-line of code. If you don't like the board, write a line of code. # Dude (Dudette), it's 1-line of code. If you don't like the board, write a line of code.
# The keys for the inputs are tuples (0-8, 0-8) that reference each Input Element. # The keys for the inputs are tuples (0-8, 0-8) that reference each Input Element.
# Get an input element for a position using: window[row, col] # Get an input element for a position using: window[row, col]
# To get a better understanding, take it apart. Spread it out. You'll learn in the process. # To get a better understanding, take it apart. Spread it out. You'll learn in the process.
window = sg.Window('Sudoku', window = sg.Window('Sudoku',
[[sg.Frame('', [[sg.I(random.randint(1,9), justification='r', size=(3,1),enable_events=True, key=(fr*3+r,fc*3+c)) for c in range(3)] for r in range(3)]) for fc in range(3)] for fr in range(3)] + [[sg.Frame('', [[sg.I(random.randint(1, 9), justification='r', size=(3, 1), key=(fr * 3 + r, fc * 3 + c)) for c in range(3)] for r in range(3)]) for fc in
[[sg.B('Solve'), sg.B('Check'), sg.B('Hint'), sg.B('New Game'), sg.T('Mask rate (0-1)'), sg.In(str(mask_rate), size=(3,1),key='-RATE-')],], finalize=True) range(3)] for fr in range(3)] +
[[sg.B('Solve'), sg.B('Check'), sg.B('Hint'), sg.B('New Game')], [sg.T('Mask rate (0-1)'), sg.In(str(mask_rate), size=(3, 1), key='-RATE-')], ],
finalize=True)
# create and display a puzzle by updating the Input elements # create and display a puzzle by updating the Input elements
puzzle, solution = create_and_show_puzzle(window) puzzle, solution = create_and_show_puzzle()
check_showing = False
while True: # The Event Loop while True: # The Event Loop
event, values = window.read() event, values = window.read()
if event == sg.WIN_CLOSED: if event is None:
break break
if event == 'Solve': if event == 'Solve':
@ -131,7 +128,6 @@ def main(mask_rate=0.7):
for c, col in enumerate(row): for c, col in enumerate(row):
window[r, c].update(solution[r][c], background_color=sg.theme_input_background_color()) window[r, c].update(solution[r][c], background_color=sg.theme_input_background_color())
elif event == 'Check': elif event == 'Check':
check_showing = True
solved = check_progress(window, solution) solved = check_progress(window, solution)
if solved: if solved:
sg.popup('Solved! You have solved the puzzle correctly.') sg.popup('Solved! You have solved the puzzle correctly.')
@ -142,15 +138,12 @@ def main(mask_rate=0.7):
except: except:
pass # Likely because an input element didn't have focus pass # Likely because an input element didn't have focus
elif event == 'New Game': elif event == 'New Game':
puzzle, solution = create_and_show_puzzle(window) puzzle, solution = create_and_show_puzzle()
elif check_showing: # an input was changed, so clear any background colors from prior hints
check_showing = False
for r, row in enumerate(solution):
for c, col in enumerate(row):
window[r, c].update(background_color=sg.theme_input_background_color())
window.close() window.close()
if __name__ == "__main__":
DEFAULT_MASK_RATE = 0.7 # % Of cells to hide if __name__ == "__main__":
main(DEFAULT_MASK_RATE) mask_rate = 0.7 # % Of cells to hide
main(mask_rate)

View file

@ -29,7 +29,7 @@ def resize_base64_image(image64, size):
""" """
image_file = io.BytesIO(base64.b64decode(image64)) image_file = io.BytesIO(base64.b64decode(image64))
img = Image.open(image_file) img = Image.open(image_file)
img.thumbnail(size, Image.ANTIALIAS) img.thumbnail(size, Image.LANCZOS)
bio = io.BytesIO() bio = io.BytesIO()
img.save(bio, format='PNG') img.save(bio, format='PNG')
imgbytes = bio.getvalue() imgbytes = bio.getvalue()

View file

@ -0,0 +1,85 @@
#!/usr/bin/env python
import PySimpleGUI as sg
import random
import string
"""
Demo Program - Table with checkboxes
This clever solution was sugged by GitHub user robochopbg.
The beauty of the simplicity is that the checkbox is simply another column in the table. When the checkbox changes
state, then the data in the table is changed and the table is updated in the Table element.
A big thank you again to user robochopbg!
Copyright 2023 PySimpleGUI
"""
# Characters used for the checked and unchecked checkboxes. Feel free to change
BLANK_BOX = ''
CHECKED_BOX = ''
# ------ Some functions to help generate data for the table ------
def word():
return ''.join(random.choice(string.ascii_lowercase) for i in range(10))
def number(max_val=1000):
return random.randint(0, max_val)
def make_table(num_rows, num_cols):
data = [[j for j in range(num_cols)] for i in range(num_rows)]
data[0] = [word() for __ in range(num_cols)]
for i in range(1, num_rows):
data[i] = [BLANK_BOX if random.randint(0,2) % 2 else CHECKED_BOX] + [word(), *[number() for i in range(num_cols - 1)]]
return data
# ------ Make the Table Data ------
data = make_table(num_rows=15, num_cols=6)
headings = [str(data[0][x])+' ..' for x in range(len(data[0]))]
headings[0] = 'Checkbox'
# The selected rows is stored in a set
selected = {i for i, row in enumerate(data[1:][:]) if row[0] == CHECKED_BOX}
# ------ Window Layout ------
layout = [[sg.Table(values=data[1:][:], headings=headings, max_col_width=25, auto_size_columns=False, col_widths=[10, 10, 20, 20 ,30, 5],
display_row_numbers=True, justification='center', num_rows=20, key='-TABLE-', selected_row_colors='red on yellow',
expand_x=False, expand_y=True, vertical_scroll_only=False, enable_click_events=True, font='_ 14'),
sg.Sizegrip()]]
# ------ Create Window ------
window = sg.Window('Table with Checkbox', layout, resizable=True, finalize=True)
# Highlight the rows (select) that have checkboxes checked
window['-TABLE-'].update(values=data[1:][:], select_rows=list(selected))
# ------ Event Loop ------
while True:
event, values = window.read()
if event == sg.WIN_CLOSED:
break
elif event[0] == '-TABLE-' and event[2][0] not in (None, -1): # if clicked a data row rather than header or outside table
row = event[2][0]+1
if data[row][0] == CHECKED_BOX: # Going from Checked to Unchecked
selected.remove(row-1)
data[row][0] = BLANK_BOX
else: # Going from Unchecked to Checked
selected.add(row-1)
data[row ][0] = CHECKED_BOX
window['-TABLE-'].update(values=data[1:][:], select_rows=list(selected)) # Update the table and the selected rows
window.close()

File diff suppressed because one or more lines are too long

View file

@ -0,0 +1,79 @@
import PySimpleGUI as sg
"""
Demo Time Chooser
A sample window for choosing a time.
This particular implementation uses a Spin element. Numerous possibilities exist for entering a time of day. Instead
of Spin elements, Input or Combo Elements could be used.
If you do not want your user to be able to manually enter values using the keyboard, then set readonly=True in
the Spin elements.
Copyright 2023 PySimpleGUI
"""
def popup_get_time(title='Time Entry', starting_hour=1, starting_minute=0, allow_manual_input=True, font=None):
"""
Shows a window that will gather a time of day.
:param title: The title that is shown on the window
:type title: str
:param starting_hour: Value to initially show in the hour field
:type starting_hour: int
:param starting_minute: Value to initially show in the minute field
:type starting_minute: int
:param allow_manual_input: If True, then the Spin elements can be manually edited
:type allow_manual_input: bool
:param font: Font to use for the window
:type font: str | tuple
:return: Tuple with format: (hour, minute, am-pm string)
:type: (int, int, str)
"""
max_value_dict = {'-HOUR-':(1, 12), '-MIN-':(0, 59)}
hour_list = [i for i in range(0, 15)]
minute_list = [i for i in range(-1, 62)]
layout = [[sg.Spin(hour_list, initial_value=starting_hour, key='-HOUR-', s=3, enable_events=True, readonly=not allow_manual_input),
sg.Text(':'),
sg.Spin(minute_list, initial_value=starting_minute, key='-MIN-', s=3, enable_events=True, readonly=not allow_manual_input),
sg.Combo(['AM', 'PM'], 'AM', readonly=True, key='-AMPM-')],
[sg.Button('Ok'), sg.Button('Cancel')]]
window = sg.Window(title, layout, font=font)
while True:
event, values = window.read()
# print(event, values)
if event == sg.WIN_CLOSED or event == 'Cancel':
hours = minutes = ampm = None
break
if event == '-HOUR-' or event == '-MIN-':
spin_value = values[event]
if spin_value > max_value_dict[event][1]:
values[event] = max_value_dict[event][0]
window[event].update(values[event])
elif spin_value < max_value_dict[event][0]:
values[event] = max_value_dict[event][1]
window[event].update(values[event])
if event == 'Ok':
# Do validation on the input values to ensure they're valid
try:
hours = int(values["-HOUR-"])
minutes = int(values["-MIN-"])
ampm = values["-AMPM-"]
except:
continue # if not valid, then don't allow exiting the window using OK.
if 1 <= hours <= 12 and 0 <= minutes < 60: # make sure the hour and minute values are in a valid range
break
window.close()
return hours, minutes, ampm
print(popup_get_time(font='_ 15'))

View file

@ -0,0 +1,55 @@
import PySimpleGUI as sg
"""
Demo - User Setting API to automatically save and load Input Elements
This Demo Program shows an easy way to add saving and loading of Input elements.
The variable keys_to_save is used to determine which elements will be saved to the user settings file.
The function make_key returns a dictionary that's used as keyword parameters that are passed to the Input elements. Using this technique allows the Input elements in the layout to benefit from the docstrings provided by PySimpleGUI. Another approach could be to use a function that returns an Input element, but that limits the flexibility for configuring Input elements.
Copyright 2023 PySimpleGUI
"""
keys_to_save = ('-IN1-', '-IN2-', '-IN3-', '-IN4-')
def make_key(key):
"""
Returns a dictionary that is used to pass parameters to an Input element.
Another approach could be to return an Input element. The downside to that approach is
the lack of parameters and associated docstrings when creating the layout.
:param key:
:return: Dict
"""
return {'default_text':sg.user_settings_get_entry(key, ''), 'key':key}
def main():
layout = [ [sg.Text('Automatically Load and Save Of Inputs', font='_ 15')],
[sg.Text('Input 1'), sg.Input(**make_key('-IN1-'))],
[sg.Text('Input 2'), sg.Input(**make_key('-IN2-'), background_color='green')],
[sg.Text('Input 3'), sg.Input(**make_key('-IN3-'), text_color='blue')],
[sg.Text('Input 4'), sg.Input(**make_key('-IN4-'), size=5)],
[sg.Button('Exit (and save)', key='-EXIT SAVE-'), sg.Button('Exit without save')] ]
window = sg.Window('Save / Load Inputs Using User Settings API', layout)
while True: # Event Loop
event, values = window.read()
print(event, values)
if event == sg.WIN_CLOSED or event == 'Exit without save':
sg.popup_quick_message('Exiting without save', text_color='white', background_color='red', font='_ 20')
break
elif event == '-EXIT SAVE-':
sg.popup_quick_message('Saving settings & Exiting', text_color='white', background_color='red', font='_ 20')
for key in keys_to_save:
sg.user_settings_set_entry(key, values[key])
break
window.close()
if __name__ == '__main__':
main()

View file

@ -0,0 +1,109 @@
import PySimpleGUI as sg
"""
Demo - Watermarking all windows
Watermarking windows can be done in 4.60.0.160 and greater. It's a very simple mechanism for now.
The option is normally set in the Global Settings control panel. However, you can "Force" the watermark
on all windows by setting the Window paramter watermark=True on any window you create and from then on
all windows will have the watermark.
Copyright 2023 PySimpleGUI
"""
"""
M"""""""`YM
M mmmm. M
M MMMMM M .d8888b.
M MMMMM M 88' `88
M MMMMM M 88. .88
M MMMMM M `88888P'
MMMMMMMMMMM
M""MMM""MMM""M dP dP
M MMM MMM M 88 88
M MMP MMP M .d8888b. d8888P .d8888b. 88d888b. 88d8b.d8b. .d8888b. 88d888b. 88 .dP
M MM' MM' .M 88' `88 88 88ooood8 88' `88 88'`88'`88 88' `88 88' `88 88888"
M `' . '' .MM 88. .88 88 88. ... 88 88 88 88 88. .88 88 88 `8b.
M .d .dMMM `88888P8 dP `88888P' dP dP dP dP `88888P8 dP dP `YP
MMMMMMMMMMMMMM
"""
layout = [ [sg.Text('No Watermark')],
[sg.Button('Exit')] ]
window = sg.Window('No Watermark', layout)
while True:
event, values = window.read()
if event == sg.WIN_CLOSED or event == 'Exit':
break
window.close()
"""
MP""""""`MM dP
M mmmmm..M 88
M. `YM dP dP .d8888b. d8888P .d8888b. 88d8b.d8b.
MMMMMMM. M 88 88 Y8ooooo. 88 88ooood8 88'`88'`88
M. .MMM' M 88. .88 88 88 88. ... 88 88 88
Mb. .dM `8888P88 `88888P' dP `88888P' dP dP dP
MMMMMMMMMMM .88
d8888P
M""MMM""MMM""M dP dP
M MMM MMM M 88 88
M MMP MMP M .d8888b. d8888P .d8888b. 88d888b. 88d8b.d8b. .d8888b. 88d888b. 88 .dP
M MM' MM' .M 88' `88 88 88ooood8 88' `88 88'`88'`88 88' `88 88' `88 88888"
M `' . '' .MM 88. .88 88 88. ... 88 88 88 88 88. .88 88 88 `8b.
M .d .dMMM `88888P8 dP `88888P' dP dP dP dP `88888P8 dP dP `YP
MMMMMMMMMMMMMM
"""
sg.set_options(watermark_text='') # noramlly not requird unless previously set by user
layout = [ [sg.Text('System Provided Watermark')],
[sg.Button('Exit')] ]
window = sg.Window('System Watermark', layout, watermark=True)
while True:
event, values = window.read()
if event == sg.WIN_CLOSED or event == 'Exit':
break
window.close()
"""
M""MMMMM""M
M MMMMM M
M MMMMM M .d8888b. .d8888b. 88d888b.
M MMMMM M Y8ooooo. 88ooood8 88' `88
M `MMM' M 88 88. ... 88
Mb dM `88888P' `88888P' dP
MMMMMMMMMMM
M""MMM""MMM""M dP dP
M MMM MMM M 88 88
M MMP MMP M .d8888b. d8888P .d8888b. 88d888b. 88d8b.d8b. .d8888b. 88d888b. 88 .dP
M MM' MM' .M 88' `88 88 88ooood8 88' `88 88'`88'`88 88' `88 88' `88 88888"
M `' . '' .MM 88. .88 88 88. ... 88 88 88 88 88. .88 88 88 `8b.
M .d .dMMM `88888P8 dP `88888P' dP dP dP dP `88888P8 dP dP `YP
MMMMMMMMMMMMMM
"""
sg.set_options(watermark_text='User Supplied Version 1.0')
layout = [ [sg.Text('User Supplied Watermark')],
[sg.Button('Exit')] ]
window = sg.Window('User Supplied Watermark', layout, watermark=True)
while True:
event, values = window.read()
if event == sg.WIN_CLOSED or event == 'Exit':
break
window.close()

View file

@ -10,10 +10,10 @@ import PySimpleGUI as sg
The purpose of this demo is to show you the simple "make window" design pattern. It simply makes a The purpose of this demo is to show you the simple "make window" design pattern. It simply makes a
window using a layout that's defined in that function and returns the Window object. It's not a bad window using a layout that's defined in that function and returns the Window object. It's not a bad
way to encapsulate windows if your applcation is gettinga little larger than the typical small data way to encapsulate windows if your application is getting a little larger than the typical small data
entry window. entry window.
Copyright 2020 PySimpleGUI.org Copyright 2020, 2023 PySimpleGUI.org
""" """
@ -25,11 +25,12 @@ def make_window():
:return: Window that is created using the layout defined in the function :return: Window that is created using the layout defined in the function
:rtype: Window :rtype: Window
""" """
layout = [[sg.Text('My Window')], layout = [[sg.Text('The program will only exit using the "Quit Program" button.')],
[sg.Input(key='-IN-'), sg.Text(size=(12, 1), key='-OUT-')], [sg.Text('Closing the window or using Exit button will cause a new window to be created.')],
[sg.Button('Go'), sg.Button('Exit')]] [sg.Input(key='-IN-')],
[sg.Button('Does Nothing'), sg.Button('Exit'), sg.Button('Quit Program')]]
return sg.Window('Window Title', layout) return sg.Window('Window that restarts on exit', layout)
def main(): def main():
@ -41,8 +42,10 @@ def main():
if event == sg.WIN_CLOSED or event == 'Exit': if event == sg.WIN_CLOSED or event == 'Exit':
window.close() window.close()
window = make_window() window = make_window()
elif event == 'Go': elif event == 'Quit Program': # The Quit Program button break out of event loop and exits program
window['-OUT-'].update(values['-IN-']) break
window.close()
if __name__ == '__main__': if __name__ == '__main__':

File diff suppressed because it is too large Load diff

View file

@ -1,3 +1,156 @@
[splatert](https://github.com/splatert) 2023-11-19T04:48:55Z
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/82643571/749bd2e5-d6fa-4a83-8508-a04aabc63202)
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/82643571/3beb849e-63b0-4d55-a541-116c8789f364)
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/82643571/16c8b7a0-3b55-40c0-9f82-13d73797374f)
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/82643571/758d4b52-9cb1-4aa7-982f-953168ba5fed)
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/82643571/970cddfc-3aa9-4932-8f38-8c12f44a0fae)
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/82643571/cf85ee38-17c4-4f19-b473-4c0427c3d203)
-----------
[PySimpleGUI](https://github.com/PySimpleGUI) 2023-11-07T14:22:15Z
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/46163555/1cedfd51-46ca-4fef-bfa3-2b05dfba09bc)
-----------
[SaSp73](https://github.com/SaSp73) 2023-11-07T09:35:57Z
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/145710363/eedb2ea9-7df5-47ab-b0cb-0894f10c0753)
-----------
[PySimpleGUI](https://github.com/PySimpleGUI) 2023-10-26T09:38:54Z
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/46163555/c68c3fdd-3bc3-4654-9cef-7b8cf1565443)
-----------
[ikeman32](https://github.com/ikeman32) 2023-10-25T21:58:09Z
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/7841462/fdddd0e4-6654-41c0-a6c7-a9262c903e8d)
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/7841462/f61d5e2b-7178-4008-8fad-6ae482aa5cfc)
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/7841462/90dac6a7-92b0-4e34-9813-aa557d4a47e7)
-----------
[PySimpleGUI](https://github.com/PySimpleGUI) 2023-10-21T16:11:14Z
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/46163555/c2881407-2cd6-43ee-86e5-10005caed189)
-----------
[onyx-and-iris](https://github.com/onyx-and-iris) 2023-09-06T00:00:13Z
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/55352169/f99212f5-1870-4387-ba4c-159dd40d4c8e)
-----------
[definite-d](https://github.com/definite-d) 2023-08-26T16:34:23Z
![launcher_dark](https://github.com/PySimpleGUI/PySimpleGUI/assets/38317208/579bc2be-abaa-4fd6-a1ea-609ada3be1a9)
![editor_dark](https://github.com/PySimpleGUI/PySimpleGUI/assets/38317208/725fd3bd-4147-4b45-a034-c85b5bd3d74d)
-----------
[luisegarduno](https://github.com/luisegarduno) 2023-06-25T05:18:40Z
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/30121656/80b10f6e-30f7-4159-8574-5f79bff705b1)
-----------
[mrtnbm](https://github.com/mrtnbm) 2023-05-25T16:24:22Z
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/49289399/1a234b86-9457-4d10-8080-ea064e915397)
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/49289399/faf9adc7-6de7-42c7-b405-05e5bf081095)
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/49289399/55a72eec-56d7-4442-b660-b42e122be488)
-----------
[eagleEggs](https://github.com/eagleEggs) 2023-05-24T04:03:28Z
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/29800532/5751e594-4748-431b-a1b2-76b1b7f346db)
-----------
[gnuchanos](https://github.com/gnuchanos) 2023-05-24T02:35:07Z
![2023-05-24-053345_1280x1024_scrot](https://github.com/PySimpleGUI/PySimpleGUI/assets/117280480/acb7b360-af3a-4ec1-a226-a35d76676167)
-----------
[PySimpleGUI](https://github.com/PySimpleGUI) 2023-05-12T09:55:03Z
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/46163555/98b78824-5286-4183-bb92-0d6fc5405270)
-----------
[zaricj](https://github.com/zaricj) 2023-04-19T09:55:26Z
![Chocolatey-GUI](https://user-images.githubusercontent.com/93329694/233038905-5a3b1f42-4794-4c6e-8411-f70f8fa79723.png)
-----------
[PySimpleGUI](https://github.com/PySimpleGUI) 2023-03-16T18:56:49Z
![image](https://user-images.githubusercontent.com/46163555/225724235-81b435c8-84f2-48e8-9ba0-9353f6179517.png)
-----------
[lucasmartins19](https://github.com/lucasmartins19) 2023-03-14T21:50:57Z
![image](https://user-images.githubusercontent.com/85654292/225143962-28c12d61-2475-47ca-ab54-85ebd5b2824b.png)
![image](https://user-images.githubusercontent.com/85654292/225144198-85d79b35-23d5-440b-91b3-bb1838fda88a.png)
![image](https://user-images.githubusercontent.com/85654292/225144622-d87c5e80-ba7c-469a-9664-4e94d8550e75.png)
![image](https://user-images.githubusercontent.com/85654292/225145054-9ea8b5c2-b8b0-481c-b065-da8af4a2ea0f.png)
![image](https://user-images.githubusercontent.com/85654292/225147555-7417e84f-248b-40e0-b55e-4096ec82534a.png)
![image](https://user-images.githubusercontent.com/85654292/225147854-4570747c-1d3c-4878-ba40-04ec70af1c0f.png)
![image](https://user-images.githubusercontent.com/85654292/225145887-782775e3-e44f-45ba-aaa2-b318ea241002.png)
-----------
[J-Josu](https://github.com/J-Josu) 2023-02-14T12:29:42Z
![image](https://user-images.githubusercontent.com/46163555/217663277-1e69dfcf-c816-4930-aada-610b157eaf0a.png)
-----------
[chanon-kr](https://github.com/chanon-kr) 2023-02-14T06:27:10Z
![image](https://user-images.githubusercontent.com/64777509/218656441-a53a0b28-76ac-4be0-a90b-3f4e57a71a56.png)
-----------
[PySimpleGUI](https://github.com/PySimpleGUI) 2023-02-08T22:16:35Z
![image](https://user-images.githubusercontent.com/46163555/217663277-1e69dfcf-c816-4930-aada-610b157eaf0a.png)
-----------
[J-Josu](https://github.com/J-Josu) 2023-01-30T13:20:08Z
![image](https://user-images.githubusercontent.com/92873227/215487552-cd9a9185-5ca1-4c63-8c4e-b084a1fce2e5.png)
![image](https://user-images.githubusercontent.com/92873227/215487639-4facc1ba-2c5f-430f-ac41-2cceb4f52708.png)
![image](https://user-images.githubusercontent.com/92873227/215487687-61a880c8-13f2-4641-80c9-455a8378a9a3.png)
![image](https://user-images.githubusercontent.com/92873227/215487759-278903f6-de06-4d47-b016-d0f5324ad6e2.png)
-----------
[PySimpleGUI](https://github.com/PySimpleGUI) 2023-01-29T15:31:26Z
![image](https://user-images.githubusercontent.com/46163555/215336720-2cc04845-ecf1-4c80-8769-8d8d92026c93.png)
![image](https://user-images.githubusercontent.com/46163555/215336743-7519cbb7-d700-47b3-8c6f-b2abb29fdea2.png)
-----------
[eagleEggs](https://github.com/eagleEggs) 2023-01-28T02:30:37Z
![image](https://user-images.githubusercontent.com/29800532/215237562-60eb47d3-b5da-4880-8b38-53f33c185f74.png)
![image](https://user-images.githubusercontent.com/29800532/215237481-117ba32e-a94e-480b-9c89-8d66922b7bff.png)
-----------
[hseera](https://github.com/hseera) 2023-01-04T23:30:35Z [hseera](https://github.com/hseera) 2023-01-04T23:30:35Z
![image](https://user-images.githubusercontent.com/59352356/210669262-7f74f961-5294-43b7-885e-d931d995569a.png) ![image](https://user-images.githubusercontent.com/59352356/210669262-7f74f961-5294-43b7-885e-d931d995569a.png)
@ -5,13 +158,13 @@
----------- -----------
[kubilayyalcinyt](https://github.com/kubilayyalcinyt) 2022-12-18T21:41:57Z [gnuchanos](https://github.com/gnuchanos) 2022-12-18T21:41:57Z
![2022-12-19-003757_1280x1012_scrot](https://user-images.githubusercontent.com/117280480/208321005-c731df95-a680-4fb7-8682-5c9b86bd6afb.png) ![2022-12-19-003757_1280x1012_scrot](https://user-images.githubusercontent.com/117280480/208321005-c731df95-a680-4fb7-8682-5c9b86bd6afb.png)
----------- -----------
[kubilayyalcinyt](https://github.com/kubilayyalcinyt) 2022-12-18T19:36:12Z [gnuchanos](https://github.com/gnuchanos) 2022-12-18T19:36:12Z
![displayManager](https://user-images.githubusercontent.com/117280480/208315826-fc2172ae-349d-42ba-9cdc-3c828b7e4c26.png) ![displayManager](https://user-images.githubusercontent.com/117280480/208315826-fc2172ae-349d-42ba-9cdc-3c828b7e4c26.png)
![gnuchanOS_Window_Manager](https://user-images.githubusercontent.com/117280480/208315827-1e8eb182-ea3d-4cb7-8c3f-a093ca58d8ec.png) ![gnuchanOS_Window_Manager](https://user-images.githubusercontent.com/117280480/208315827-1e8eb182-ea3d-4cb7-8c3f-a093ca58d8ec.png)
@ -585,7 +738,7 @@
----------- -----------
[vohe](https://github.com/vohe) 2022-01-23T13:53:09Z [ghost](https://github.com/ghost) 2022-01-23T13:53:09Z
![AudioRecScreenshot](https://user-images.githubusercontent.com/7021635/150681690-1874c8c0-4464-46a4-ae0f-748a618fb845.png) ![AudioRecScreenshot](https://user-images.githubusercontent.com/7021635/150681690-1874c8c0-4464-46a4-ae0f-748a618fb845.png)
@ -735,7 +888,7 @@
----------- -----------
[Scania-Creations-16](https://github.com/Scania-Creations-16) 2021-11-04T02:55:59Z [Pranav-P-16](https://github.com/Pranav-P-16) 2021-11-04T02:55:59Z
![yt1](https://user-images.githubusercontent.com/91425738/140249931-76fdda21-fbdf-42a0-81a7-add95ab122b6.png) ![yt1](https://user-images.githubusercontent.com/91425738/140249931-76fdda21-fbdf-42a0-81a7-add95ab122b6.png)
![yt2](https://user-images.githubusercontent.com/91425738/140249937-26fba679-b813-471e-a09c-f81ff1a7a53d.png) ![yt2](https://user-images.githubusercontent.com/91425738/140249937-26fba679-b813-471e-a09c-f81ff1a7a53d.png)
@ -744,7 +897,7 @@
----------- -----------
[Scania-Creations-16](https://github.com/Scania-Creations-16) 2021-10-31T04:14:25Z [Pranav-P-16](https://github.com/Pranav-P-16) 2021-10-31T04:14:25Z
![mp1](https://user-images.githubusercontent.com/91425738/139567280-a9b18a68-e052-414a-898c-7537c90f2aac.png) ![mp1](https://user-images.githubusercontent.com/91425738/139567280-a9b18a68-e052-414a-898c-7537c90f2aac.png)
![mp2](https://user-images.githubusercontent.com/91425738/139567295-35c8d463-2a27-4724-94e6-c21c85aa55e4.png) ![mp2](https://user-images.githubusercontent.com/91425738/139567295-35c8d463-2a27-4724-94e6-c21c85aa55e4.png)
@ -1081,13 +1234,13 @@
----------- -----------
[vohe](https://github.com/vohe) 2020-08-08T11:11:29Z [ghost](https://github.com/ghost) 2020-08-08T11:11:29Z
![Picture](https://user-images.githubusercontent.com/7021635/89708548-82ae8600-d978-11ea-8a8d-59b24e092830.png) ![Picture](https://user-images.githubusercontent.com/7021635/89708548-82ae8600-d978-11ea-8a8d-59b24e092830.png)
----------- -----------
[vohe](https://github.com/vohe) 2020-08-05T13:31:05Z [ghost](https://github.com/ghost) 2020-08-05T13:31:05Z
![Popup Directory](https://user-images.githubusercontent.com/7021635/89418628-9c5d8c80-d730-11ea-9f6f-42d190cfdbf5.png) ![Popup Directory](https://user-images.githubusercontent.com/7021635/89418628-9c5d8c80-d730-11ea-9f6f-42d190cfdbf5.png)
![Popup Directory2](https://user-images.githubusercontent.com/7021635/89418636-9e275000-d730-11ea-8de6-f02c4a304701.png) ![Popup Directory2](https://user-images.githubusercontent.com/7021635/89418636-9e275000-d730-11ea-8de6-f02c4a304701.png)
@ -1100,13 +1253,13 @@
----------- -----------
[vohe](https://github.com/vohe) 2020-08-02T17:28:23Z [ghost](https://github.com/ghost) 2020-08-02T17:28:23Z
![mockupall](https://user-images.githubusercontent.com/7021635/89128448-ec9cda80-d4f5-11ea-965d-05cef5844f8f.png) ![mockupall](https://user-images.githubusercontent.com/7021635/89128448-ec9cda80-d4f5-11ea-965d-05cef5844f8f.png)
----------- -----------
[vohe](https://github.com/vohe) 2020-07-05T16:45:42Z [ghost](https://github.com/ghost) 2020-07-05T16:45:42Z
![english](https://user-images.githubusercontent.com/7021635/86537489-b61c7180-beef-11ea-9b65-4d11b0a4d515.png) ![english](https://user-images.githubusercontent.com/7021635/86537489-b61c7180-beef-11ea-9b65-4d11b0a4d515.png)
![german](https://user-images.githubusercontent.com/7021635/86537492-b7e63500-beef-11ea-8b41-e79d1cbbc904.png) ![german](https://user-images.githubusercontent.com/7021635/86537492-b7e63500-beef-11ea-8b41-e79d1cbbc904.png)
@ -1114,7 +1267,7 @@
----------- -----------
[vohe](https://github.com/vohe) 2020-07-04T15:43:31Z [ghost](https://github.com/ghost) 2020-07-04T15:43:31Z
![Audiorecorder (spotify)](https://user-images.githubusercontent.com/7021635/86515989-6a00fc80-be1d-11ea-89c9-08411c829eb7.png) ![Audiorecorder (spotify)](https://user-images.githubusercontent.com/7021635/86515989-6a00fc80-be1d-11ea-89c9-08411c829eb7.png)

View file

@ -1,3 +1,380 @@
[splatert](https://github.com/splatert) 2023-11-19T04:48:55Z
Hello. I would like to thank you for the awesome UI framework you built as it really does help create interfaces in a really simple manner. I've given credit to you on my project's readme file and provided a link that leads to your github page.
With the power of your library, I've created an alternative UI frontend for SpotDL. A tool for downloading Spotify tracks using URLs that you provide. Now SpotDL does have their own interface which is loaded onto the web browser but It felt like it was slow as it took a couple of seconds to start up, which is why I wanted to create my own.
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/82643571/749bd2e5-d6fa-4a83-8508-a04aabc63202)
The way this frontend is used is that you provide each link into the interface's textbox then hit the plus button to pass them to a list of URLs (which then the listbox shown above displays the urls list).
Upon providing URLs, you then press the download button to initiate the download process (given that you provide the SpotDL executable).
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/82643571/3beb849e-63b0-4d55-a541-116c8789f364)
If the control shown above is checked, the program would ask you to provide a name for the folder you want to create and send downloaded songs to. Prompt dialog is shown below.
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/82643571/16c8b7a0-3b55-40c0-9f82-13d73797374f)
Pressing **OK** will assign the folder name to a string variable then tell the program that you want to create a folder.
Pressing **Cancel** or having the checkbox mentioned above unmarked would not tell the program to create any folders.
After information is provided, the program executes SpotDL with the links you entered passed as arguments and will wait for it to complete the download job.
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/82643571/758d4b52-9cb1-4aa7-982f-953168ba5fed)
After the download job is finished, songs get transferred over to the frontend's music directory and you will get a message saying that the download process has been completed.
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/82643571/970cddfc-3aa9-4932-8f38-8c12f44a0fae)
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/82643571/cf85ee38-17c4-4f19-b473-4c0427c3d203)
Here's a link to the project repository.
https://github.com/splatert/spotdl-ui
-----------
[SaSp73](https://github.com/SaSp73) 2023-11-07T15:52:58Z
Thanks for your kind words. I will send you the code in a couple of days when I return back home.
It need some extra hardware (PICAN-M board, Adafruit ADC and BME280 barometer), but you will manage to get around this with a little bit of tinkering.
Basically the whole control is a graph with elements redrawing according to the calculated data...
BTW, a Rotate_Figure(figure_id, center_point, degrees_of_rotation) would be very helpful (I will open a suggestion later)
-----------
[PySimpleGUI](https://github.com/PySimpleGUI) 2023-11-07T14:22:15Z
WOW @SaSp73 !!
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/46163555/1cedfd51-46ca-4fef-bfa3-2b05dfba09bc)
Truly mind-blowing and very inspiring to see. I've never seen anything like this done with PySimpleGUI! One of the things I love about this project are the surprises by what people create.
I would love to see how you did some of the things you did if you ever care to share the code (even privately would be great.... I'll be confidential. I'm curious what features were helpful).
Thank you so so much for sharing.
-----------
[kcl1s](https://github.com/kcl1s) 2023-11-07T11:01:09Z
Wow
Those graphics are fantastic. Thanks for sharing.
-----------
[SaSp73](https://github.com/SaSp73) 2023-11-07T09:35:57Z
This is my use of PySimpleGUI, a program reading NMEA200 networks, running on raspberry pi 4, and presenting various data used for sail racing.
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/145710363/eedb2ea9-7df5-47ab-b0cb-0894f10c0753)
-----------
[PySimpleGUI](https://github.com/PySimpleGUI) 2023-10-26T09:38:54Z
We're on very similar wavelengths @ikeman32. It's great to see some add-on tools to help users.
As part of the PySimpleGUI 5 release of the PySimpleGUI applications and add-on modules, I've written a GUI tool that creates all of the necessary files to upload a PySimpleGUI application to PyPI, opening up distribution of Python applications to PySimpleGUI users. We've been releasing tools via PyPI for some time. "psgresizer" is a good example. Users can pip install it and then once installed it can be run by typing "psgresizer" from the command line. There's already a tool, psgshortcut, that takes it all a start further by making shortcuts (icons) that can be pinned to the taskbar or double-clicked.
The idea is to make distribution easy as well as the result be familiar feeling. The command line isn't a normal part of a normal Windows user's world, so getting it out of the way entirely makes a lot of sense. I've just about got the final tool finished that will make it all work end to end.
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/46163555/c68c3fdd-3bc3-4654-9cef-7b8cf1565443)
-----------
[ikeman32](https://github.com/ikeman32) 2023-10-25T21:58:09Z
I have created a simple bash script to initialize a PySimpleGUI project. It can be found here: https://github.com/ikeman32/ScriptHelpers/tree/main/devscripts
It's very basic at the moment, but functional. For Windows users, I do have an AI-generated port, but it remains untested as I gave up my Windows addiction in 2017. I may eventually create a platform-independent version of the script using Python.
I do accept code contributions, so if there are Windows users that want to develop a Windows batch equivalent or a Python version of this script, see the README. Or you can code your own.
PySimpleGUI is an absolute God-sent for me. I like simplicity, and I am also lazy, so if there is an easier way to do something, I'm all for it. I'm also in the planning stages for a visual editor/IDE for PySimpleGUI applications.
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/7841462/fdddd0e4-6654-41c0-a6c7-a9262c903e8d)
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/7841462/f61d5e2b-7178-4008-8fad-6ae482aa5cfc)
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/7841462/90dac6a7-92b0-4e34-9813-aa557d4a47e7)
-----------
[maria-korosteleva](https://github.com/maria-korosteleva) 2023-10-23T09:26:11Z
@PySimpleGUI Thank you very much for your kind words! 🥰
-----------
[PySimpleGUI](https://github.com/PySimpleGUI) 2023-10-21T16:11:14Z
Wow @maria-korosteleva what an incredible application! I love what you've created! ![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/46163555/c2881407-2cd6-43ee-86e5-10005caed189)
I've never seen anything like what you've made. There's clearly a **lot** going on with your work than just a GUI. I had never thought about the intersection of CAD and making garments. It's a fascinating use of technology. I really appreciate you taking the time to post a screenshot and letting us know about your project.
-----------
[maria-korosteleva](https://github.com/maria-korosteleva) 2023-10-20T11:52:13Z
I've used the framework to build a garment design configurator in my latest research paper on programmable garments =)
https://github.com/maria-korosteleva/GarmentCode
https://igl.ethz.ch/projects/garmentcode/
<img width="957" alt="Screenshot GUI_2_mosaic" src="https://github.com/PySimpleGUI/PySimpleGUI/assets/6837635/76c59bcf-5b43-4e33-9ac4-fb0afb490da2">
-----------
[onyx-and-iris](https://github.com/onyx-and-iris) 2023-09-06T00:00:13Z
A small remote utility for Voicemeeter, designed to work with the NVDA screen reader.
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/55352169/f99212f5-1870-4387-ba4c-159dd40d4c8e)
https://github.com/onyx-and-iris/nvda-voicemeeter
Thanks for creating PYSimpleGUI, first time using but very impressed!
-----------
[definite-d](https://github.com/definite-d) 2023-08-26T16:34:23Z
[Themera](https://github.com/definite-d/Themera) v2.1.0 has been released (available [here](https://github.com/definite-d/Themera/releases/tag/v2.1.0)). I'd like to share screenshots and point out that with Windows 11, the color of the "built-in" titlebar can be customized. I accomplished it within Themera with a bit of a non-standard solution, but it's proof of concept.
![launcher_dark](https://github.com/PySimpleGUI/PySimpleGUI/assets/38317208/579bc2be-abaa-4fd6-a1ea-609ada3be1a9)
![editor_dark](https://github.com/PySimpleGUI/PySimpleGUI/assets/38317208/725fd3bd-4147-4b45-a034-c85b5bd3d74d)
-----------
[luisegarduno](https://github.com/luisegarduno) 2023-06-25T05:18:40Z
**Chess (updated!)**
Originally added/created by @MikeTheWatchGuy, the chess demos (player vs. player & player vs. Ai) were included in PySimpleGUI ([see here](https://github.com/PySimpleGUI/PySimpleGUI/tree/8b23740fca08b7f5bad3f0d32760f42a5202d3e1/Chess)), but were removed from the main branch towards the end of 2022.
In terms of the changes that I made to the original code (see #5052):
I updated **requirements.txt** to include the latest versions:
```
PySimpleGUI==4.60.5
python-chess==1.999
```
I then made changes within both of the demo files to remove any outdated or deprecated code causing errors. I also added compatibility for Linux, allowing users to import files that do not end in ".exe".
Both chess demos have only been tested on Ubuntu 20.04 but should also work on Windows since not much was changed from the original code. Lastly, for the engine, I resulted in having to use Stockfish 13, since there was several issues when trying to use Stockfish 14 or Stockfish 15.
https://github.com/luisegarduno/ChessGUI
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/30121656/80b10f6e-30f7-4159-8574-5f79bff705b1)
-----------
[mrtnbm](https://github.com/mrtnbm) 2023-05-25T16:24:22Z
Thanks to PSG, I've created the nicest GUI I've ever made that I'm now using for my own little naive prompt lib.
- Main window:
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/49289399/1a234b86-9457-4d10-8080-ea064e915397)
- Edit Window:
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/49289399/faf9adc7-6de7-42c7-b405-05e5bf081095)
The heart can be clicked and will change to outline or fill mode.
- For reference, here is a screenshot without rescaling:
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/49289399/55a72eec-56d7-4442-b660-b42e122be488)
-----------
[eagleEggs](https://github.com/eagleEggs) 2023-05-24T04:03:28Z
Started this a few days ago. Thanks to PSG it has already proven the hypothesis as valid - Streamlining novel development in a curated parameter driven manner with op3nAI API. Much more functionality to add in, but what an amazing GUI framework <3 <3 <3 And thanks to @jason990420 for all of the tkinter hacks he's posted which has always covered everything I've needed :)
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/29800532/5751e594-4748-431b-a1b2-76b1b7f346db)
-----------
[gnuchanos](https://github.com/gnuchanos) 2023-05-24T02:35:07Z
![2023-05-24-053345_1280x1024_scrot](https://github.com/PySimpleGUI/PySimpleGUI/assets/117280480/acb7b360-af3a-4ec1-a226-a35d76676167)
not finish yet
-----------
[PySimpleGUI](https://github.com/PySimpleGUI) 2023-05-12T09:55:03Z
I saw this awesome screenshot:
![image](https://github.com/PySimpleGUI/PySimpleGUI/assets/46163555/98b78824-5286-4183-bb92-0d6fc5405270)
posted in the readme for this project:
https://github.com/bsanders2/FrosthavenApp
It's got a nice design and the custom buttons look great.
-----------
[zaricj](https://github.com/zaricj) 2023-04-19T09:55:26Z
I've been using PySimpleGUI to make a GUI for the Chocolatey Package Manager, thought of sending a screenshot of it here.
![Chocolatey-GUI](https://user-images.githubusercontent.com/93329694/233038905-5a3b1f42-4794-4c6e-8411-f70f8fa79723.png)
Thanks for this amazing module, I'm really having fun learning it!
-----------
[PySimpleGUI](https://github.com/PySimpleGUI) 2023-03-16T18:56:49Z
@ssweber the color scheme looks like the `GrayGrayGray` theme to me which means no colors will be added (all system defaults will be used). The important feature that's adding the images is either `Image` elements or `Button` elements. Using a Base64 version of images will enable you to drop them directly into your source code. The PySimpleGUI application `psgresizer` is very helpful in enabling you to quickly add button graphics to your application.
Here are some steps I followed:
- I made a video of a session where I took images that I clipped from @lucasmartins19 's application and saved them as PNG files
- Used `psgresizer` to convert each PNG file into a Base64 string
- Pasted the Base64 string into my test program
- Created a layout that used these Base64 images using the `Image` element.
My layout looked liket his:
```python
layout = [ [sg.Text('Base64 Images Example')],
[sg.Image(b1, key='-I1-')],
[sg.Image(b2, key='-I2-')],
[sg.Image(b3, key='-I3-')],
[sg.Button('Go'), sg.Button('Exit')] ]
```
When I ran the code, this is the window I saw:
![image](https://user-images.githubusercontent.com/46163555/225724235-81b435c8-84f2-48e8-9ba0-9353f6179517.png)
If you enable events on the `Image` elements, then you'll get an event when the image is clicked.
```python
layout = [ [sg.Text('Base64 Images Example')],
[sg.Image(b1, key='-I1-', enable_events=True)],
[sg.Image(b2, key='-I2-', enable_events=True)],
[sg.Image(b3, key='-I3-', enable_events=True)],
[sg.Button('Go'), sg.Button('Exit')] ]
```
Here's how the process to do all this looked:
https://user-images.githubusercontent.com/46163555/225724860-33b5b5ba-9e63-4159-9ccc-825b72aef11a.mp4
-----------
[lucasmartins19](https://github.com/lucasmartins19) 2023-03-16T14:04:53Z
> @lucasmartins19 That looks amazing. Would you mind uploading that to a repository? Im working on a general purpose pysimplegui toolkit and I really like your color-scheme /buttons. Would like to see how you put that all together.
Thank you!
Currently, I have a private one to manage everything and provide updates through GitHub. However, I will create a new private repository and invite you as a collaborator. Please feel free to ask me if you need any help understanding anything.
-----------
[ssweber](https://github.com/ssweber) 2023-03-16T13:22:48Z
@lucasmartins19 That looks amazing. Would you mind uploading that to a repository? Im working on a general purpose pysimplegui toolkit and I really like your color-scheme /buttons. Would like to see how you put that all together.
-----------
[lucasmartins19](https://github.com/lucasmartins19) 2023-03-14T21:50:57Z
Hi!
I developed this simple application using PySimpleGUI to help my cousin manage his optics lab.
Don't mind the data, it was randomly generated for testing purposes.
![image](https://user-images.githubusercontent.com/85654292/225143962-28c12d61-2475-47ca-ab54-85ebd5b2824b.png)
![image](https://user-images.githubusercontent.com/85654292/225144198-85d79b35-23d5-440b-91b3-bb1838fda88a.png)
![image](https://user-images.githubusercontent.com/85654292/225144622-d87c5e80-ba7c-469a-9664-4e94d8550e75.png)
![image](https://user-images.githubusercontent.com/85654292/225145054-9ea8b5c2-b8b0-481c-b065-da8af4a2ea0f.png)
![image](https://user-images.githubusercontent.com/85654292/225147555-7417e84f-248b-40e0-b55e-4096ec82534a.png)
![image](https://user-images.githubusercontent.com/85654292/225147854-4570747c-1d3c-4878-ba40-04ec70af1c0f.png)
![image](https://user-images.githubusercontent.com/85654292/225145887-782775e3-e44f-45ba-aaa2-b318ea241002.png)
-----------
[J-Josu](https://github.com/J-Josu) 2023-02-14T12:29:42Z
> Thank you @J-Josu ![image](https://user-images.githubusercontent.com/46163555/217663277-1e69dfcf-c816-4930-aada-610b157eaf0a.png) for sharing your program and your story. I love hearing when students use PySimpleGUI! I'm glad it went well. The screenshots look great!
>
> Code annotation too? Do you have a GitHub Repo with your code?
>
> I'm impressed by bi-lingual programmers. It's hard enough coding, reading, writing, and thinking just in English. Throwing another language on top of all that is next-level stuff. Really happy you posted what you've made!
Hi @PySimpleGUI, yes i have uploaded the project to the following [repository](https://github.com/J-Josu/FiguRace)
Thanks you for all!
-----------
[chanon-kr](https://github.com/chanon-kr) 2023-02-14T06:27:10Z
Hi, I use PySimpleGUI to make a Simple Object Detection GUI with YOLOv8.
Check my GitHub repo from this link.
[Simple Object Detection GUI](https://github.com/chanon-kr/simple_imagui_app)
And here is a screenshot of the GUI.
![image](https://user-images.githubusercontent.com/64777509/218656441-a53a0b28-76ac-4be0-a90b-3f4e57a71a56.png)
Thanks to @PySimpleGUI for suggestions and improvement!!
-----------
[PySimpleGUI](https://github.com/PySimpleGUI) 2023-02-08T22:16:35Z
Thank you @J-Josu ![image](https://user-images.githubusercontent.com/46163555/217663277-1e69dfcf-c816-4930-aada-610b157eaf0a.png) for sharing your program and your story. I love hearing when students use PySimpleGUI! I'm glad it went well. The screenshots look great!
Code annotation too? Do you have a GitHub Repo with your code?
I'm impressed by bi-lingual programmers. It's hard enough coding, reading, writing, and thinking just in English. Throwing another language on top of all that is next-level stuff. Really happy you posted what you've made!
-----------
[J-Josu](https://github.com/J-Josu) 2023-01-30T13:20:08Z
Hi! I'm a stundent of Computer Science in Argentina and i`ve had to do a Final project for my Python Course. The project its about a card game where you can choose between availible themes to try to guess the correct option. The data is automtically loaded from cvs.
Here are some screenshoots of the final result:
![image](https://user-images.githubusercontent.com/92873227/215487552-cd9a9185-5ca1-4c63-8c4e-b084a1fce2e5.png)
![image](https://user-images.githubusercontent.com/92873227/215487639-4facc1ba-2c5f-430f-ac41-2cceb4f52708.png)
![image](https://user-images.githubusercontent.com/92873227/215487687-61a880c8-13f2-4641-80c9-455a8378a9a3.png)
![image](https://user-images.githubusercontent.com/92873227/215487759-278903f6-de06-4d47-b016-d0f5324ad6e2.png)
And other pages...
All the ui its in spanish, but the code all written in english.
The project includes a mini-framework to build pages easly and some cli utilities.
Also the code have all the corresponding typing annotations and more interesting stuff.
-----------
[PySimpleGUI](https://github.com/PySimpleGUI) 2023-01-29T15:31:26Z
@eagleEggs I briefly saw a version of this GUI and then it disappeared. I'm THRILLED you've posted it. ![image](https://user-images.githubusercontent.com/46163555/215336720-2cc04845-ecf1-4c80-8769-8d8d92026c93.png)
Thank you so very much for sharing your talent in using PySimpleGUI. You're such an expert now and I SO appreciate you being here since the early days.
That's a beautiful window.... just plain beautiful!
Your support and encouragement have been really appreciated.
![image](https://user-images.githubusercontent.com/46163555/215336743-7519cbb7-d700-47b3-8c6f-b2abb29fdea2.png)
-----------
[eagleEggs](https://github.com/eagleEggs) 2023-01-28T02:30:37Z
PSG WOOOHOOOO. Super fast implementation of this thanks to PSG. We were able to jump straight into core code, and add new things on the fly in minutes. This is a vulnerability management / parser, scanner... and moreeeee.
![image](https://user-images.githubusercontent.com/29800532/215237562-60eb47d3-b5da-4880-8b38-53f33c185f74.png)
![image](https://user-images.githubusercontent.com/29800532/215237481-117ba32e-a94e-480b-9c89-8d66922b7bff.png)
Thanks again PSG <3
-----------
[hseera](https://github.com/hseera) 2023-01-04T23:30:35Z [hseera](https://github.com/hseera) 2023-01-04T23:30:35Z
Using PySimpleGUI framework, I built an opernsource tool called "CloudWatch Dashboard Builder" for SRE, Performance Engineers and Operations teams, who work with AWS services. It gives them capability to build CloudWatch Dashboard from different Namespace templates. The tool lets you modify the template too. Using PySimpleGUI framework, I built an opernsource tool called "CloudWatch Dashboard Builder" for SRE, Performance Engineers and Operations teams, who work with AWS services. It gives them capability to build CloudWatch Dashboard from different Namespace templates. The tool lets you modify the template too.
@ -15,14 +392,14 @@ https://www.youtube.com/watch?v=tPCHCc-GiHM
----------- -----------
[kubilayyalcinyt](https://github.com/kubilayyalcinyt) 2022-12-18T21:41:57Z [gnuchanos](https://github.com/gnuchanos) 2022-12-18T21:41:57Z
![2022-12-19-003757_1280x1012_scrot](https://user-images.githubusercontent.com/117280480/208321005-c731df95-a680-4fb7-8682-5c9b86bd6afb.png) ![2022-12-19-003757_1280x1012_scrot](https://user-images.githubusercontent.com/117280480/208321005-c731df95-a680-4fb7-8682-5c9b86bd6afb.png)
this is what ı say ı can't do like my tiling manager this is what ı say ı can't do like my tiling manager
----------- -----------
[kubilayyalcinyt](https://github.com/kubilayyalcinyt) 2022-12-18T21:05:02Z [gnuchanos](https://github.com/gnuchanos) 2022-12-18T21:05:02Z
okay ı try example finish ı ask again okay ı try example finish ı ask again
----------- -----------
@ -32,7 +409,7 @@ okay ı try example finish ı ask again
----------- -----------
[kubilayyalcinyt](https://github.com/kubilayyalcinyt) 2022-12-18T19:36:12Z [gnuchanos](https://github.com/gnuchanos) 2022-12-18T19:36:12Z
![displayManager](https://user-images.githubusercontent.com/117280480/208315826-fc2172ae-349d-42ba-9cdc-3c828b7e4c26.png) ![displayManager](https://user-images.githubusercontent.com/117280480/208315826-fc2172ae-349d-42ba-9cdc-3c828b7e4c26.png)
![gnuchanOS_Window_Manager](https://user-images.githubusercontent.com/117280480/208315827-1e8eb182-ea3d-4cb7-8c3f-a093ca58d8ec.png) ![gnuchanOS_Window_Manager](https://user-images.githubusercontent.com/117280480/208315827-1e8eb182-ea3d-4cb7-8c3f-a093ca58d8ec.png)
how ı create like this window first login screen second normal window ı try but ı can't do how ı create like this window first login screen second normal window ı try but ı can't do
@ -2131,7 +2508,7 @@ Obviously the GUI was the easy part!
----------- -----------
[vohe](https://github.com/vohe) 2022-01-23T13:53:09Z [ghost](https://github.com/ghost) 2022-01-23T13:53:09Z
The Januar Version is ready to go. The Januar Version is ready to go.
I manged it , finally, to work without lastfm. For everyone who can use this: I manged it , finally, to work without lastfm. For everyone who can use this:
Audiorecorder,, records (e.g.) spotify web player - with free account. Audiorecorder,, records (e.g.) spotify web player - with free account.
@ -3028,7 +3405,7 @@ Love all the graphics you're including your GUIs. It adds a level up from the b
----------- -----------
[Scania-Creations-16](https://github.com/Scania-Creations-16) 2021-11-04T02:55:59Z [Pranav-P-16](https://github.com/Pranav-P-16) 2021-11-04T02:55:59Z
Created a Simple Youtube Downloader using PySimpleGUI :blush: Created a Simple Youtube Downloader using PySimpleGUI :blush:
![yt1](https://user-images.githubusercontent.com/91425738/140249931-76fdda21-fbdf-42a0-81a7-add95ab122b6.png) ![yt1](https://user-images.githubusercontent.com/91425738/140249931-76fdda21-fbdf-42a0-81a7-add95ab122b6.png)
@ -3043,7 +3420,7 @@ Created a Simple Youtube Downloader using PySimpleGUI :blush:
----------- -----------
[Scania-Creations-16](https://github.com/Scania-Creations-16) 2021-11-01T04:11:56Z [Pranav-P-16](https://github.com/Pranav-P-16) 2021-11-01T04:11:56Z
> You're quite welcome. > You're quite welcome.
> >
> **Thank you** @Scania-Creations-16 for posting your screenshot! Awesome awesome creation! I'm impressed! > **Thank you** @Scania-Creations-16 for posting your screenshot! Awesome awesome creation! I'm impressed!
@ -3079,7 +3456,7 @@ I'm sure there are things that others can learn. If you're a beginner, then I'm
----------- -----------
[Scania-Creations-16](https://github.com/Scania-Creations-16) 2021-10-31T04:14:25Z [Pranav-P-16](https://github.com/Pranav-P-16) 2021-10-31T04:14:25Z
I made a Music Player using PySimpleGUI I made a Music Player using PySimpleGUI
@ -4254,7 +4631,7 @@ GitHub.com/MOABdali/megaCheckers if anyone wants to try it. Please keep in mind
----------- -----------
[vohe](https://github.com/vohe) 2020-08-08T11:11:29Z [ghost](https://github.com/ghost) 2020-08-08T11:11:29Z
Ready to go, Ready to go,
I found that putting move than 3000 elements in a sg.treedata() structure works, but as i close that there'll be a huge garbage collection of tkinter under the hood. I found that putting move than 3000 elements in a sg.treedata() structure works, but as i close that there'll be a huge garbage collection of tkinter under the hood.
So my directory popup window isn't usable for a 'normal' user directory, especially if the show hidden files option is active. So my directory popup window isn't usable for a 'normal' user directory, especially if the show hidden files option is active.
@ -4268,7 +4645,7 @@ Have Fun, stay healthy.
----------- -----------
[vohe](https://github.com/vohe) 2020-08-05T13:31:05Z [ghost](https://github.com/ghost) 2020-08-05T13:31:05Z
In addition to get a Folder Browser running , which does not In addition to get a Folder Browser running , which does not
- show hidden files, - show hidden files,
- throws errors on Permissions - throws errors on Permissions
@ -4291,7 +4668,7 @@ The bars for each color have the color of the original image and the other-color
----------- -----------
[vohe](https://github.com/vohe) 2020-08-02T17:28:23Z [ghost](https://github.com/ghost) 2020-08-02T17:28:23Z
Hi folks, Hi folks,
here is another one i playing with.... here is another one i playing with....
The TreeElement is not as flexible as i want it. But many things are possible. The TreeElement is not as flexible as i want it. But many things are possible.
@ -4301,7 +4678,7 @@ I got the functionallity i want, but the interface isn't that what i like to get
----------- -----------
[vohe](https://github.com/vohe) 2020-07-05T16:45:42Z [ghost](https://github.com/ghost) 2020-07-05T16:45:42Z
Thank you, Thank you,
first of all i got it as i like (but not so elegant) First of all it works. first of all i got it as i like (but not so elegant) First of all it works.
![english](https://user-images.githubusercontent.com/7021635/86537489-b61c7180-beef-11ea-9b65-4d11b0a4d515.png) ![english](https://user-images.githubusercontent.com/7021635/86537489-b61c7180-beef-11ea-9b65-4d11b0a4d515.png)
@ -4326,7 +4703,7 @@ https://github.com/PySimpleGUI/PySimpleGUI/issues/new?assignees=&labels=&templat
----------- -----------
[vohe](https://github.com/vohe) 2020-07-04T21:28:44Z [ghost](https://github.com/ghost) 2020-07-04T21:28:44Z
> Very nice @vohe ! Thanks for posting it! > Very nice @vohe ! Thanks for posting it!
> I like they use of tabs. Great , simple layout. I might have to use that idea for settings sometime. It's never dawned on me before to put them into a tab like that. > I like they use of tabs. Great , simple layout. I might have to use that idea for settings sometime. It's never dawned on me before to put them into a tab like that.
@ -4343,7 +4720,7 @@ I like they use of tabs. Great , simple layout. I might have to use that idea
----------- -----------
[vohe](https://github.com/vohe) 2020-07-04T15:43:31Z [ghost](https://github.com/ghost) 2020-07-04T15:43:31Z
![Audiorecorder (spotify)](https://user-images.githubusercontent.com/7021635/86515989-6a00fc80-be1d-11ea-89c9-08411c829eb7.png) ![Audiorecorder (spotify)](https://user-images.githubusercontent.com/7021635/86515989-6a00fc80-be1d-11ea-89c9-08411c829eb7.png)
A little Programm, that records files form a webside (actually open.spotify) store them as mp3, tag them, sort them into directorys , notify the user when a new song is beginning. A little Programm, that records files form a webside (actually open.spotify) store them as mp3, tag them, sort them into directorys , notify the user when a new song is beginning.

View file

@ -25,9 +25,9 @@
<span style="font-weight: normal;"> <span style="font-weight: normal;">
apply coupon for discount: apply coupon for discount:
</span> </span>
266B9C51C90B3728782E 522B20BF5EF123C4AB30.
</div> </div>
<button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=266B9C51C90B3728782E','_blank');"> <button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=522B20BF5EF123C4AB30','_blank');">
click here to visit course page click here to visit course page
</button> </button>
</div> </div>
@ -126,7 +126,7 @@ Parameter Descriptions:
| (str, str) or str | mouseover_colors | Important difference between Linux & Windows! Linux - Colors when mouse moved over button. Windows - colors when button is pressed. The default is to switch the text and background colors (an inverse effect) | | (str, str) or str | mouseover_colors | Important difference between Linux & Windows! Linux - Colors when mouse moved over button. Windows - colors when button is pressed. The default is to switch the text and background colors (an inverse effect) |
| bool | use_ttk_buttons | True = use ttk buttons. False = do not use ttk buttons. None (Default) = use ttk buttons only if on a Mac and not with button images | | bool | use_ttk_buttons | True = use ttk buttons. False = do not use ttk buttons. None (Default) = use ttk buttons only if on a Mac and not with button images |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| bool | bind_return_key | If True the return key will cause this button to be pressed | | bool | bind_return_key | If True then pressing the return key in an Input or Multiline Element will cause this button to appear to be clicked (generates event with this button's key |
| bool | focus | if True, initial focus will be put on this button | | bool | focus | if True, initial focus will be put on this button |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
@ -1305,6 +1305,7 @@ Checkbox(text,
background_color = None, background_color = None,
text_color = None, text_color = None,
checkbox_color = None, checkbox_color = None,
highlight_thickness = 1,
change_submits = False, change_submits = False,
enable_events = False, enable_events = False,
disabled = False, disabled = False,
@ -1333,6 +1334,7 @@ Parameter Descriptions:
| str | background_color | color of background | | str | background_color | color of background |
| str | text_color | color of the text | | str | text_color | color of the text |
| str | checkbox_color | color of background of the box that has the check mark in it. The checkmark is the same color as the text | | str | checkbox_color | color of background of the box that has the check mark in it. The checkmark is the same color as the text |
| int | highlight_thickness | thickness of border around checkbox when gets focus |
| bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | | bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead |
| bool | enable_events | Turns on the element specific events. Checkbox events happen when an item changes | | bool | enable_events | Turns on the element specific events. Checkbox events happen when an item changes |
| bool | disabled | set disable state | | bool | disabled | set disable state |
@ -2214,7 +2216,7 @@ Parameter Descriptions:
| str | text_color | color of the text | | str | text_color | color of the text |
| str | button_background_color | The color of the background of the button on the combo box | | str | button_background_color | The color of the background of the button on the combo box |
| str | button_arrow_color | The color of the arrow on the button on the combo box | | str | button_arrow_color | The color of the arrow on the button on the combo box |
| bool | bind_return_key | If True, then the return key will cause a the Combo to generate an event | | bool | bind_return_key | If True, then the return key will cause a the Combo to generate an event when return key is pressed |
| bool | change_submits | DEPRICATED DO NOT USE. Use `enable_events` instead | | bool | change_submits | DEPRICATED DO NOT USE. Use `enable_events` instead |
| bool | enable_events | Turns on the element specific events. Combo event is when a choice is made | | bool | enable_events | Turns on the element specific events. Combo event is when a choice is made |
| bool | enable_per_char_events | Enables generation of events for every character that's input. This is like the Input element's events | | bool | enable_per_char_events | Enables generation of events for every character that's input. This is like the Input element's events |
@ -2481,7 +2483,9 @@ update(value = None,
font = None, font = None,
visible = None, visible = None,
size = (None, None), size = (None, None),
select = None) select = None,
text_color = None,
background_color = None)
``` ```
Parameter Descriptions: Parameter Descriptions:
@ -2497,6 +2501,8 @@ Parameter Descriptions:
| bool | visible | control visibility of element | | bool | visible | control visibility of element |
| (int, int) | size | width, height. Width = characters-wide, height = NOTE it's the number of entries to show in the list | | (int, int) | size | width, height. Width = characters-wide, height = NOTE it's the number of entries to show in the list |
| bool | select | if True, then the text will be selected, if False then selection will be cleared | | bool | select | if True, then the text will be selected, if False then selection will be cleared |
| str | background_color | color of background |
| str | text_color | color of the text |
### visible ### visible
@ -2586,7 +2592,9 @@ Update(value = None,
font = None, font = None,
visible = None, visible = None,
size = (None, None), size = (None, None),
select = None) select = None,
text_color = None,
background_color = None)
``` ```
Parameter Descriptions: Parameter Descriptions:
@ -2602,6 +2610,8 @@ Parameter Descriptions:
| bool | visible | control visibility of element | | bool | visible | control visibility of element |
| (int, int) | size | width, height. Width = characters-wide, height = NOTE it's the number of entries to show in the list | | (int, int) | size | width, height. Width = characters-wide, height = NOTE it's the number of entries to show in the list |
| bool | select | if True, then the text will be selected, if False then selection will be cleared | | bool | select | if True, then the text will be selected, if False then selection will be cleared |
| str | background_color | color of background |
| str | text_color | color of the text |
--------- ---------
@ -4881,6 +4891,8 @@ Input(default_text = "",
readonly = False, readonly = False,
disabled_readonly_background_color = None, disabled_readonly_background_color = None,
disabled_readonly_text_color = None, disabled_readonly_text_color = None,
selected_text_color = None,
selected_background_color = None,
expand_x = False, expand_x = False,
expand_y = False, expand_y = False,
right_click_menu = None, right_click_menu = None,
@ -4915,6 +4927,8 @@ Parameter Descriptions:
| bool | readonly | If True tkinter state set to 'readonly'. Use this in place of use_readonly_for_disable as another way of achieving readonly. Note cannot set BOTH readonly and disabled as tkinter only supplies a single flag | | bool | readonly | If True tkinter state set to 'readonly'. Use this in place of use_readonly_for_disable as another way of achieving readonly. Note cannot set BOTH readonly and disabled as tkinter only supplies a single flag |
| str | disabled_readonly_background_color | If state is set to readonly or disabled, the color to use for the background | | str | disabled_readonly_background_color | If state is set to readonly or disabled, the color to use for the background |
| str | disabled_readonly_text_color | If state is set to readonly or disabled, the color to use for the text | | str | disabled_readonly_text_color | If state is set to readonly or disabled, the color to use for the text |
| str | selected_text_color | Color of text when it is selected (using mouse or control+A, etc) |
| str | selected_background_color | Color of background when it is selected (using mouse or control+A, etc) |
| bool | expand_x | If True the element will automatically expand in the X direction to fill available space | | bool | expand_x | If True the element will automatically expand in the X direction to fill available space |
| bool | expand_y | If True the element will automatically expand in the Y direction to fill available space | | bool | expand_y | If True the element will automatically expand in the Y direction to fill available space |
| List[List[ List[str] or str ]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | | List[List[ List[str] or str ]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. |
@ -5096,6 +5110,22 @@ Parameter Descriptions:
|--|--|--| |--|--|--|
| bool | force | if True will call focus_force otherwise calls focus_set | | bool | force | if True will call focus_force otherwise calls focus_set |
### set_ibeam_color
Sets the color of the I-Beam that is used to "insert" characters. This is oftens called a "Cursor" by
many users. To keep from being confused with tkinter's definition of cursor (the mouse pointer), the term
ibeam is used in this case.
```
set_ibeam_color(ibeam_color = None)
```
Parameter Descriptions:
|Type|Name|Meaning|
|--|--|--|
| str | ibeam_color | color to set the "I-Beam" used to indicate where characters will be inserted |
### set_size ### set_size
Changes the size of an element to a specific size. Changes the size of an element to a specific size.
@ -5359,7 +5389,7 @@ Parameter Descriptions:
| [enum] | select_mode | Select modes are used to determine if only 1 item can be selected or multiple and how they can be selected. Valid choices begin with "LISTBOX_SELECT_MODE_" and include: LISTBOX_SELECT_MODE_SINGLE LISTBOX_SELECT_MODE_MULTIPLE LISTBOX_SELECT_MODE_BROWSE LISTBOX_SELECT_MODE_EXTENDED | | [enum] | select_mode | Select modes are used to determine if only 1 item can be selected or multiple and how they can be selected. Valid choices begin with "LISTBOX_SELECT_MODE_" and include: LISTBOX_SELECT_MODE_SINGLE LISTBOX_SELECT_MODE_MULTIPLE LISTBOX_SELECT_MODE_BROWSE LISTBOX_SELECT_MODE_EXTENDED |
| bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | | bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead |
| bool | enable_events | Turns on the element specific events. Listbox generates events when an item is clicked | | bool | enable_events | Turns on the element specific events. Listbox generates events when an item is clicked |
| bool | bind_return_key | If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | If True, then the return key will cause a the Listbox to generate an event when return key is pressed |
| (int, int) or (int, None) or int | size | w=characters-wide, h=rows-high. If an int instead of a tuple is supplied, then height is auto-set to 1 | | (int, int) or (int, None) or int | size | w=characters-wide, h=rows-high. If an int instead of a tuple is supplied, then height is auto-set to 1 |
| (int, int) or (None, None) or int | s | Same as size parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, size will be used | | (int, int) or (None, None) or int | s | Same as size parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, size will be used |
| bool | disabled | set disable state for element | | bool | disabled | set disable state for element |
@ -5553,6 +5583,24 @@ Metadata is an Element property that you can use at any time to hold any value
|---|---|---| |---|---|---|
|(Any)| **return** | the current metadata value | |(Any)| **return** | the current metadata value |
### select_index
Selects an index while providing capability to setting the selected color for the index to specific text/background color
```
select_index(index,
highlight_text_color = None,
highlight_background_color = None)
```
Parameter Descriptions:
|Type|Name|Meaning|
|--|--|--|
| int | index | specifies which item to change. index starts at 0 and goes to length of values list minus one |
| str | highlight_text_color | color of the text when this item is selected. |
| str | highlight_background_color | color of the background when this item is selected |
### set_cursor ### set_cursor
Sets the cursor for the current Element. Sets the cursor for the current Element.
@ -5586,6 +5634,28 @@ Parameter Descriptions:
|--|--|--| |--|--|--|
| bool | force | if True will call focus_force otherwise calls focus_set | | bool | force | if True will call focus_force otherwise calls focus_set |
### set_index_color
Sets the color of a specific item without selecting it
```
set_index_color(index,
text_color = None,
background_color = None,
highlight_text_color = None,
highlight_background_color = None)
```
Parameter Descriptions:
|Type|Name|Meaning|
|--|--|--|
| int | index | specifies which item to change. index starts at 0 and goes to length of values list minus one |
| str | text_color | color of the text for this item |
| str | background_color | color of the background for this item |
| str | highlight_text_color | color of the text when this item is selected. |
| str | highlight_background_color | color of the background when this item is selected |
### set_size ### set_size
Changes the size of an element to a specific size. Changes the size of an element to a specific size.
@ -6244,12 +6314,15 @@ Multiline(default_text = "",
enter_submits = False, enter_submits = False,
disabled = False, disabled = False,
autoscroll = False, autoscroll = False,
autoscroll_only_at_bottom = False,
border_width = None, border_width = None,
size = (None, None), size = (None, None),
s = (None, None), s = (None, None),
auto_size_text = None, auto_size_text = None,
background_color = None, background_color = None,
text_color = None, text_color = None,
selected_text_color = None,
selected_background_color = None,
horizontal_scroll = False, horizontal_scroll = False,
change_submits = False, change_submits = False,
enable_events = False, enable_events = False,
@ -6293,12 +6366,15 @@ Parameter Descriptions:
| bool | enter_submits | if True, the Window.read call will return is enter key is pressed in this element | | bool | enter_submits | if True, the Window.read call will return is enter key is pressed in this element |
| bool | disabled | set disable state | | bool | disabled | set disable state |
| bool | autoscroll | If True the contents of the element will automatically scroll as more data added to the end | | bool | autoscroll | If True the contents of the element will automatically scroll as more data added to the end |
| bool | autoscroll_only_at_bottom | If True the contents of the element will automatically scroll only if the scrollbar is at the bottom of the multiline |
| int | border_width | width of border around element in pixels | | int | border_width | width of border around element in pixels |
| (int, int) or (None, None) or int | size | (w, h) w=characters-wide, h=rows-high. If an int instead of a tuple is supplied, then height is auto-set to 1 | | (int, int) or (None, None) or int | size | (w, h) w=characters-wide, h=rows-high. If an int instead of a tuple is supplied, then height is auto-set to 1 |
| (int, int) or (None, None) or int | s | Same as size parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, size will be used | | (int, int) or (None, None) or int | s | Same as size parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, size will be used |
| bool | auto_size_text | if True will size the element to match the length of the text | | bool | auto_size_text | if True will size the element to match the length of the text |
| str | background_color | color of background | | str | background_color | color of background |
| str | text_color | color of the text | | str | text_color | color of the text |
| str | selected_text_color | Color of text when it is selected (using mouse or control+A, etc) |
| str | selected_background_color | Color of background when it is selected (using mouse or control+A, etc) |
| bool | horizontal_scroll | Controls if a horizontal scrollbar should be shown. If True a horizontal scrollbar will be shown in addition to vertical | | bool | horizontal_scroll | Controls if a horizontal scrollbar should be shown. If True a horizontal scrollbar will be shown in addition to vertical |
| bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | | bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead |
| bool | enable_events | If True then any key press that happens when the element has focus will generate an event. | | bool | enable_events | If True then any key press that happens when the element has focus will generate an event. |
@ -6590,6 +6666,22 @@ Parameter Descriptions:
|--|--|--| |--|--|--|
| bool | force | if True will call focus_force otherwise calls focus_set | | bool | force | if True will call focus_force otherwise calls focus_set |
### set_ibeam_color
Sets the color of the I-Beam that is used to "insert" characters. This is oftens called a "Cursor" by
many users. To keep from being confused with tkinter's definition of cursor (the mouse pointer), the term
ibeam is used in this case.
```
set_ibeam_color(ibeam_color = None)
```
Parameter Descriptions:
|Type|Name|Meaning|
|--|--|--|
| str | ibeam_color | color to set the "I-Beam" used to indicate where characters will be inserted |
### set_size ### set_size
Changes the size of an element to a specific size. Changes the size of an element to a specific size.
@ -7200,11 +7292,11 @@ Parameter Descriptions:
--------- ---------
## Output Element (No longer recommended - USE `Multiline` instead) ## Output Element
Rather than use the `Output` element, it's recommended that you use the `Multiline` element instead. The reason for this is that more controls have been added to the Multiline and in the future you can expect more features will be added to the Multiline while the `Output` element has stopped being enhanced. Output Element - a multi-lined text area to where stdout, stderr, cprint are rerouted.
You can control which Multiline Element receives your stdout output as well as use the color-print (`cprint`) with a Multiline. Now based on the `Multiline` element
Output Element - a multi-lined text area to where stdout, stderr, cprint are rerouted. Output Element - a multi-lined text area to where stdout, stderr, cprint are rerouted.
@ -7227,6 +7319,7 @@ Output(size = (None, None),
text_color = None, text_color = None,
pad = None, pad = None,
p = None, p = None,
autoscroll_only_at_bottom = False,
echo_stdout_stderr = False, echo_stdout_stderr = False,
font = None, font = None,
tooltip = None, tooltip = None,
@ -7258,6 +7351,7 @@ Parameter Descriptions:
| str | text_color | color of the text | | str | text_color | color of the text |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
| bool | autoscroll_only_at_bottom | If True the contents of the element will automatically scroll only if the scrollbar is at the bottom of the multiline |
| bool | echo_stdout_stderr | If True then output to stdout will be output to this element AND also to the normal console location | | bool | echo_stdout_stderr | If True then output to stdout will be output to this element AND also to the normal console location |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| str | tooltip | text, that will appear when mouse hovers over the element | | str | tooltip | text, that will appear when mouse hovers over the element |
@ -8902,7 +8996,7 @@ Parameter Descriptions:
|--|--|--| |--|--|--|
| int | h_pixels | number of horizontal pixels | | int | h_pixels | number of horizontal pixels |
| int | v_pixels | number of vertical pixels | | int | v_pixels | number of vertical pixels |
| (Column) | **RETURN** | (Column) A column element that has a pad setting set according to parameters | (Canvas) | **RETURN** | (Canvas) A canvas element that has a pad setting set according to parameters
------- -------
@ -9616,7 +9710,7 @@ Parameter Descriptions:
| (int, int) or (None, None) or int | size | (w, h) w=characters-wide, h=rows-high. If an int instead of a tuple is supplied, then height is auto-set to 1 | | (int, int) or (None, None) or int | size | (w, h) w=characters-wide, h=rows-high. If an int instead of a tuple is supplied, then height is auto-set to 1 |
| (int, int) or (None, None) or int | s | Same as size parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, size will be used | | (int, int) or (None, None) or int | s | Same as size parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, size will be used |
| bool | auto_size_text | if True will size the element to match the length of the text | | bool | auto_size_text | if True will size the element to match the length of the text |
| bool | bind_return_key | If True, then the return key will cause a the element to generate an event | | bool | bind_return_key | If True, then the return key will cause a the element to generate an event when return key is pressed |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| str | background_color | color of background | | str | background_color | color of background |
| str | text_color | color of the text | | str | text_color | color of the text |
@ -9809,6 +9903,22 @@ Parameter Descriptions:
|--|--|--| |--|--|--|
| bool | force | if True will call focus_force otherwise calls focus_set | | bool | force | if True will call focus_force otherwise calls focus_set |
### set_ibeam_color
Sets the color of the I-Beam that is used to "insert" characters. This is oftens called a "Cursor" by
many users. To keep from being confused with tkinter's definition of cursor (the mouse pointer), the term
ibeam is used in this case.
```
set_ibeam_color(ibeam_color = None)
```
Parameter Descriptions:
|Type|Name|Meaning|
|--|--|--|
| str | ibeam_color | color to set the "I-Beam" used to indicate where characters will be inserted |
### set_size ### set_size
Changes the size of an element to a specific size. Changes the size of an element to a specific size.
@ -10980,14 +11090,14 @@ Parameter Descriptions:
Returns the current value for the Tab Group, which will be the currently selected tab's KEY or the text on Returns the current value for the Tab Group, which will be the currently selected tab's KEY or the text on
the tab if no key is defined. Returns None if an error occurs. the tab if no key is defined. Returns None if an error occurs.
Note that this is exactly the same data that would be returned from a call to Window.Read. Are you sure you Note that this is exactly the same data that would be returned from a call to Window.read. Are you sure you
are using this method correctly? are using this method correctly?
`get()` `get()`
|Type|Name|Meaning| |Type|Name|Meaning|
|---|---|---| |---|---|---|
|Any | None| **return** | The key of the currently selected tab or the tab's text if it has no key | |Any | None| **return** | The key of the currently selected tab or None if there is an error |
### get_next_focus ### get_next_focus
@ -11212,14 +11322,14 @@ Parameter Descriptions:
Returns the current value for the Tab Group, which will be the currently selected tab's KEY or the text on Returns the current value for the Tab Group, which will be the currently selected tab's KEY or the text on
the tab if no key is defined. Returns None if an error occurs. the tab if no key is defined. Returns None if an error occurs.
Note that this is exactly the same data that would be returned from a call to Window.Read. Are you sure you Note that this is exactly the same data that would be returned from a call to Window.read. Are you sure you
are using this method correctly? are using this method correctly?
`Get()` `Get()`
|Type|Name|Meaning| |Type|Name|Meaning|
|---|---|---| |---|---|---|
|Any | None| **return** | The key of the currently selected tab or the tab's text if it has no key | |Any | None| **return** | The key of the currently selected tab or None if there is an error |
### SetFocus ### SetFocus
@ -11420,15 +11530,13 @@ Parameter Descriptions:
### get ### get
Dummy function for tkinter port. In the Qt port you can read back the values in the table in case they were Get the selected rows using tktiner's selection method. Returns a list of the selected rows.
edited. Don't know yet how to enable editing of a Tree in tkinter so just returning the values provided by
user when Table was created or Updated.
`get()` `get()`
|Type|Name|Meaning| |Type|Name|Meaning|
|---|---|---| |---|---|---|
|List[List[Any]]| **return** | the current table values (for now what was originally provided up updated) | |List[int]| **return** | a list of the index of the selected rows (a list of ints) |
### get_next_focus ### get_next_focus
@ -11652,15 +11760,13 @@ The following methods are here for backwards compatibility reference. You will
### Get ### Get
Dummy function for tkinter port. In the Qt port you can read back the values in the table in case they were Get the selected rows using tktiner's selection method. Returns a list of the selected rows.
edited. Don't know yet how to enable editing of a Tree in tkinter so just returning the values provided by
user when Table was created or Updated.
`Get()` `Get()`
|Type|Name|Meaning| |Type|Name|Meaning|
|---|---|---| |---|---|---|
|List[List[Any]]| **return** | the current table values (for now what was originally provided up updated) | |List[int]| **return** | a list of the index of the selected rows (a list of ints) |
### SetFocus ### SetFocus
@ -12194,6 +12300,7 @@ Tree(data = None,
show_expanded = False, show_expanded = False,
change_submits = False, change_submits = False,
enable_events = False, enable_events = False,
click_toggles_select = None,
font = None, font = None,
justification = "right", justification = "right",
text_color = None, text_color = None,
@ -12245,6 +12352,7 @@ Parameter Descriptions:
| bool | show_expanded | if True then the tree will be initially shown with all nodes completely expanded | | bool | show_expanded | if True then the tree will be initially shown with all nodes completely expanded |
| bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | | bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead |
| bool | enable_events | Turns on the element specific events. Tree events happen when row is clicked | | bool | enable_events | Turns on the element specific events. Tree events happen when row is clicked |
| bool | click_toggles_select | If True then clicking a row will cause the selection for that row to toggle between selected and deselected |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| str | justification | 'left', 'right', 'center' are valid choices | | str | justification | 'left', 'right', 'center' are valid choices |
| str | text_color | color of the text | | str | text_color | color of the text |
@ -13044,6 +13152,7 @@ Window(title,
sbar_arrow_width = None, sbar_arrow_width = None,
sbar_frame_color = None, sbar_frame_color = None,
sbar_relief = None, sbar_relief = None,
watermark = None,
metadata = None) metadata = None)
``` ```
@ -13111,6 +13220,7 @@ Parameter Descriptions:
| int | sbar_arrow_width | Scrollbar width of the arrow on the scrollbar. It will potentially impact the overall width of the scrollbar | | int | sbar_arrow_width | Scrollbar width of the arrow on the scrollbar. It will potentially impact the overall width of the scrollbar |
| str | sbar_frame_color | Scrollbar Color of frame around scrollbar (available only on some ttk themes) | | str | sbar_frame_color | Scrollbar Color of frame around scrollbar (available only on some ttk themes) |
| str | sbar_relief | Scrollbar relief that will be used for the "thumb" of the scrollbar (the thing you grab that slides). Should be a constant that is defined at starting with "RELIEF_" - RELIEF_RAISED, RELIEF_SUNKEN, RELIEF_FLAT, RELIEF_RIDGE, RELIEF_GROOVE, RELIEF_SOLID | | str | sbar_relief | Scrollbar relief that will be used for the "thumb" of the scrollbar (the thing you grab that slides). Should be a constant that is defined at starting with "RELIEF_" - RELIEF_RAISED, RELIEF_SUNKEN, RELIEF_FLAT, RELIEF_RIDGE, RELIEF_GROOVE, RELIEF_SOLID |
| bool | watermark | If True, then turns on watermarking temporarily for ALL windows created from this point forward. See global settings doc for more info |
| Any | metadata | User metadata that can be set to ANYTHING | | Any | metadata | User metadata that can be set to ANYTHING |
### add_row ### add_row
@ -13615,7 +13725,7 @@ IMPORTANT - This method uses THREADS... this means you CANNOT make any PySimpleG
the function you provide with the exception of one function, Window.write_event_value. the function you provide with the exception of one function, Window.write_event_value.
``` ```
perform_long_operation(func, end_key) perform_long_operation(func, end_key = None)
``` ```
Parameter Descriptions: Parameter Descriptions:
@ -13623,7 +13733,7 @@ Parameter Descriptions:
|Type|Name|Meaning| |Type|Name|Meaning|
|--|--|--| |--|--|--|
| Any | func | A lambda or a function name with no parms | | Any | func | A lambda or a function name with no parms |
| Any | end_key | The key that will be generated when the function returns | | (Any or None) | end_key | Optional key that will be generated when the function returns |
| threading.Thread | **RETURN** | The id of the thread | threading.Thread | **RETURN** | The id of the thread
### read ### read
@ -13837,7 +13947,7 @@ IMPORTANT - This method uses THREADS... this means you CANNOT make any PySimpleG
the function you provide with the exception of one function, Window.write_event_value. the function you provide with the exception of one function, Window.write_event_value.
``` ```
start_thread(func, end_key) start_thread(func, end_key = None)
``` ```
Parameter Descriptions: Parameter Descriptions:
@ -13845,9 +13955,63 @@ Parameter Descriptions:
|Type|Name|Meaning| |Type|Name|Meaning|
|--|--|--| |--|--|--|
| Any | func | A lambda or a function name with no parms | | Any | func | A lambda or a function name with no parms |
| Any | end_key | The key that will be generated when the function returns | | (Any or None) | end_key | Optional key that will be generated when the function returns |
| threading.Thread | **RETURN** | The id of the thread | threading.Thread | **RETURN** | The id of the thread
### timer_get_active_timers
Returns a list of currently active timers for a window
`timer_get_active_timers()`
|Type|Name|Meaning|
|---|---|---|
|List[int]| **return** | List of timers for the window |
### timer_start
Starts a timer that gnerates Timer Events. The default is to repeat the timer events until timer is stopped.
You can provide your own key or a default key will be used. The default key is defined
with the constants EVENT_TIMER or TIMER_KEY. They both equal the same value.
The values dictionary will contain the timer ID that is returned from this function.
```
timer_start(frequency_ms,
key = "__TIMER EVENT__",
repeating = True)
```
Parameter Descriptions:
|Type|Name|Meaning|
|--|--|--|
| int | frequency_ms | How often to generate timer events in milliseconds |
| str or int or tuple or object | key | Key to be returned as the timer event |
| bool | repeating | If True then repeat timer events until timer is explicitly stopped |
| int | **RETURN** | Timer ID for the timer
### timer_stop
Stops a timer with a given ID
```
timer_stop(timer_id)
```
Parameter Descriptions:
|Type|Name|Meaning|
|--|--|--|
| int | timer_id | Timer ID of timer to stop |
### timer_stop_all
Stops all timers for THIS window
```python
timer_stop_all()
```
### un_hide ### un_hide
Used to bring back a window that was previously hidden using the Hide method Used to bring back a window that was previously hidden using the Hide method
@ -14911,7 +15075,7 @@ Parameter Descriptions:
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| bool | focus | if focus should be set to this | | bool | focus | if focus should be set to this |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
@ -14919,6 +15083,7 @@ Parameter Descriptions:
| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | | str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. |
| str | locale | defines the locale used to get day names | | str | locale | defines the locale used to get day names |
| str | format | formats result using this strftime format | | str | format | formats result using this strftime format |
| int | begin_at_sunday_plus | Determines the left-most day in the display. 0=sunday, 1=monday, etc |
| List[str] | month_names | optional list of month names to use (should be 12 items) | | List[str] | month_names | optional list of month names to use (should be 12 items) |
| List[str] | day_abbreviations | optional list of abbreviations to display as the day of week | | List[str] | day_abbreviations | optional list of abbreviations to display as the day of week |
| str | title | Title shown on the date chooser window | | str | title | Title shown on the date chooser window |
@ -14963,7 +15128,7 @@ Parameter Descriptions:
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| str | tooltip | text, that will appear when mouse hovers over the element | | str | tooltip | text, that will appear when mouse hovers over the element |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| | focus | if focus should be set to this | | | focus | if focus should be set to this |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
@ -15021,7 +15186,7 @@ Parameter Descriptions:
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| bool | bind_return_key | If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| bool | focus | Determines if initial focus should go to this element. | | bool | focus | Determines if initial focus should go to this element. |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
@ -15072,7 +15237,7 @@ Parameter Descriptions:
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| str | tooltip | text, that will appear when mouse hovers over the element | | str | tooltip | text, that will appear when mouse hovers over the element |
| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| | focus | if focus should be set to this | | | focus | if focus should be set to this |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
@ -15134,7 +15299,7 @@ Parameter Descriptions:
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| bool | focus | if focus should be set to this | | bool | focus | if focus should be set to this |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
@ -15179,7 +15344,7 @@ Parameter Descriptions:
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| str | tooltip | text, that will appear when mouse hovers over the element | | str | tooltip | text, that will appear when mouse hovers over the element |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| | focus | if focus should be set to this | | | focus | if focus should be set to this |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
@ -15432,7 +15597,7 @@ Parameter Descriptions:
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| str | tooltip | text, that will appear when mouse hovers over the element | | str | tooltip | text, that will appear when mouse hovers over the element |
| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| | focus | if focus should be set to this | | | focus | if focus should be set to this |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
@ -15520,7 +15685,7 @@ Parameter Descriptions:
| bool | auto_size_button | True if button size is determined by button text | | bool | auto_size_button | True if button size is determined by button text |
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| bool | bind_return_key | (Default = True) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = True) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| str | tooltip | text, that will appear when mouse hovers over the element | | str | tooltip | text, that will appear when mouse hovers over the element |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| idk_yetReally | focus | if focus should be set to this | | idk_yetReally | focus | if focus should be set to this |
@ -15565,7 +15730,7 @@ Parameter Descriptions:
| bool | auto_size_button | True if button size is determined by button text | | bool | auto_size_button | True if button size is determined by button text |
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| bool | bind_return_key | (Default = True) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = True) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| str | tooltip | text, that will appear when mouse hovers over the element | | str | tooltip | text, that will appear when mouse hovers over the element |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| idk_yetReally | focus | if focus should be set to this | | idk_yetReally | focus | if focus should be set to this |
@ -15610,7 +15775,7 @@ Parameter Descriptions:
| bool | auto_size_button | True if button size is determined by button text | | bool | auto_size_button | True if button size is determined by button text |
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| bool | bind_return_key | (Default = True) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = True) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| str | tooltip | text, that will appear when mouse hovers over the element | | str | tooltip | text, that will appear when mouse hovers over the element |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| idk_yetReally | focus | if focus should be set to this | | idk_yetReally | focus | if focus should be set to this |
@ -15657,7 +15822,7 @@ Parameter Descriptions:
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| str | tooltip | text, that will appear when mouse hovers over the element | | str | tooltip | text, that will appear when mouse hovers over the element |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| bool | focus | if focus should be set to this | | bool | focus | if focus should be set to this |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
@ -15712,7 +15877,7 @@ Parameter Descriptions:
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| bool | focus | if focus should be set to this | | bool | focus | if focus should be set to this |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
@ -15754,7 +15919,7 @@ Parameter Descriptions:
| (int, int) or (None, None) or int | s | Same as size parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, size will be used | | (int, int) or (None, None) or int | s | Same as size parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, size will be used |
| bool | auto_size_button | True if button size is determined by button text | | bool | auto_size_button | True if button size is determined by button text |
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
| bool | bind_return_key | (Default = True) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = True) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| str | tooltip | text, that will appear when mouse hovers over the element | | str | tooltip | text, that will appear when mouse hovers over the element |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
@ -15852,7 +16017,7 @@ Parameter Descriptions:
| bool | auto_size_button | True if button size is determined by button text | | bool | auto_size_button | True if button size is determined by button text |
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| bool | bind_return_key | (Default = True) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = True) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| str | tooltip | text, that will appear when mouse hovers over the element | | str | tooltip | text, that will appear when mouse hovers over the element |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| idk_yetReally | focus | if focus should be set to this | | idk_yetReally | focus | if focus should be set to this |
@ -15899,7 +16064,7 @@ Parameter Descriptions:
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| str | tooltip | text, that will appear when mouse hovers over the element | | str | tooltip | text, that will appear when mouse hovers over the element |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| bool | bind_return_key | (Default = True) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = True) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| | focus | if focus should be set to this | | | focus | if focus should be set to this |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
@ -15956,7 +16121,7 @@ Parameter Descriptions:
| bool | auto_size_button | True if button size is determined by button text | | bool | auto_size_button | True if button size is determined by button text |
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| idk_yetReally | focus | if focus should be set to this | | idk_yetReally | focus | if focus should be set to this |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
@ -16009,7 +16174,7 @@ Parameter Descriptions:
| bool | auto_size_button | True if button size is determined by button text | | bool | auto_size_button | True if button size is determined by button text |
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| idk_yetReally | focus | if focus should be set to this | | idk_yetReally | focus | if focus should be set to this |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
@ -16067,7 +16232,7 @@ Parameter Descriptions:
| bool | auto_size_button | True if button size is determined by button text | | bool | auto_size_button | True if button size is determined by button text |
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| idk_yetReally | focus | if focus should be set to this | | idk_yetReally | focus | if focus should be set to this |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
@ -16124,7 +16289,7 @@ Parameter Descriptions:
| bool | auto_size_button | True if button size is determined by button text | | bool | auto_size_button | True if button size is determined by button text |
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| idk_yetReally | focus | if focus should be set to this | | idk_yetReally | focus | if focus should be set to this |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
@ -16571,11 +16736,11 @@ Parameter Descriptions:
|Type|Name|Meaning| |Type|Name|Meaning|
|--|--|--| |--|--|--|
| str | title | text to display in eleemnt | | str | title | text to display in titlebar of window |
| int | current_value | current value | | int | current_value | current value |
| int | max_value | max value of QuickMeter | | int | max_value | max value of progress meter |
| Any | *args | stuff to output | | Any | *args | stuff to output as text in the window along with the meter |
| str or int or tuple or object | key | Used to differentiate between mutliple meters. Used to cancel meter early. Now optional as there is a default value for single meters | | str or int or tuple or object | key | Used to differentiate between multiple meters. Used to cancel meter early. Now optional as there is a default value for single meters |
| str | orientation | 'horizontal' or 'vertical' ('h' or 'v' work) (Default value = 'vertical' / 'v') | | str | orientation | 'horizontal' or 'vertical' ('h' or 'v' work) (Default value = 'vertical' / 'v') |
| (str, str) or str | bar_color | The 2 colors that make up a progress bar. Either a tuple of 2 strings or a string. Tuple - (bar, background). A string with 1 color changes the background of the bar only. A string with 2 colors separated by "on" like "red on blue" specifies a red bar on a blue background. | | (str, str) or str | bar_color | The 2 colors that make up a progress bar. Either a tuple of 2 strings or a string. Tuple - (bar, background). A string with 1 color changes the background of the bar only. A string with 2 colors separated by "on" like "red on blue" specifies a red bar on a blue background. |
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
@ -16625,11 +16790,11 @@ Parameter Descriptions:
|Type|Name|Meaning| |Type|Name|Meaning|
|--|--|--| |--|--|--|
| str | title | text to display in eleemnt | | str | title | text to display in titlebar of window |
| int | current_value | current value | | int | current_value | current value |
| int | max_value | max value of QuickMeter | | int | max_value | max value of progress meter |
| Any | *args | stuff to output | | Any | *args | stuff to output as text in the window along with the meter |
| str or int or tuple or object | key | Used to differentiate between mutliple meters. Used to cancel meter early. Now optional as there is a default value for single meters | | str or int or tuple or object | key | Used to differentiate between multiple meters. Used to cancel meter early. Now optional as there is a default value for single meters |
| str | orientation | 'horizontal' or 'vertical' ('h' or 'v' work) (Default value = 'vertical' / 'v') | | str | orientation | 'horizontal' or 'vertical' ('h' or 'v' work) (Default value = 'vertical' / 'v') |
| (str, str) or str | bar_color | The 2 colors that make up a progress bar. Either a tuple of 2 strings or a string. Tuple - (bar, background). A string with 1 color changes the background of the bar only. A string with 2 colors separated by "on" like "red on blue" specifies a red bar on a blue background. | | (str, str) or str | bar_color | The 2 colors that make up a progress bar. Either a tuple of 2 strings or a string. Tuple - (bar, background). A string with 1 color changes the background of the bar only. A string with 2 colors separated by "on" like "red on blue" specifies a red bar on a blue background. |
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
@ -16738,7 +16903,8 @@ popup_animated(image_source,
time_between_frames = 0, time_between_frames = 0,
transparent_color = None, transparent_color = None,
title = "", title = "",
icon = None) icon = None,
no_buffering = False)
``` ```
Parameter Descriptions: Parameter Descriptions:
@ -16760,6 +16926,7 @@ Parameter Descriptions:
| str | transparent_color | This color will be completely see-through in your window. Can even click through | | str | transparent_color | This color will be completely see-through in your window. Can even click through |
| str | title | Title that will be shown on the window | | str | title | Title that will be shown on the window |
| str or bytes | icon | Same as Window icon parameter. Can be either a filename or Base64 byte string. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO | | str or bytes | icon | Same as Window icon parameter. Can be either a filename or Base64 byte string. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO |
| bool | no_buffering | If True then no buffering will be used for the GIF. May work better if you have a large animation |
| bool | **RETURN** | True if the window updated OK. False if the window was closed | bool | **RETURN** | True if the window updated OK. False if the window was closed
Popup that closes itself after some time period Popup that closes itself after some time period
@ -16942,6 +17109,9 @@ popup_get_date(start_mon = None,
locale = None, locale = None,
month_names = None, month_names = None,
day_abbreviations = None, day_abbreviations = None,
day_font = "TkFixedFont 9",
mon_year_font = "TkFixedFont 10",
arrow_font = "TkFixedFont 7",
modal = True) modal = True)
``` ```
@ -16963,6 +17133,9 @@ Parameter Descriptions:
| bool | keep_on_top | If True the window will remain above all current windows | | bool | keep_on_top | If True the window will remain above all current windows |
| List[str] | month_names | optional list of month names to use (should be 12 items) | | List[str] | month_names | optional list of month names to use (should be 12 items) |
| List[str] | day_abbreviations | optional list of abbreviations to display as the day of week | | List[str] | day_abbreviations | optional list of abbreviations to display as the day of week |
| str or tuple | day_font | Font and size to use for the calendar |
| str or tuple | mon_year_font | Font and size to use for the month and year at the top |
| str or tuple | arrow_font | Font and size to use for the arrow buttons |
| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | | bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True |
| None or (int, int, int) | **RETURN** | Tuple containing (month, day, year) of chosen date or None if was cancelled | None or (int, int, int) | **RETURN** | Tuple containing (month, day, year) of chosen date or None if was cancelled
@ -17816,7 +17989,8 @@ PopupAnimated(image_source,
time_between_frames = 0, time_between_frames = 0,
transparent_color = None, transparent_color = None,
title = "", title = "",
icon = None) icon = None,
no_buffering = False)
``` ```
Parameter Descriptions: Parameter Descriptions:
@ -17838,6 +18012,7 @@ Parameter Descriptions:
| str | transparent_color | This color will be completely see-through in your window. Can even click through | | str | transparent_color | This color will be completely see-through in your window. Can even click through |
| str | title | Title that will be shown on the window | | str | title | Title that will be shown on the window |
| str or bytes | icon | Same as Window icon parameter. Can be either a filename or Base64 byte string. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO | | str or bytes | icon | Same as Window icon parameter. Can be either a filename or Base64 byte string. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO |
| bool | no_buffering | If True then no buffering will be used for the GIF. May work better if you have a large animation |
| bool | **RETURN** | True if the window updated OK. False if the window was closed | bool | **RETURN** | True if the window updated OK. False if the window was closed
Display a Popup without a titlebar. Enables grab anywhere so you can move it Display a Popup without a titlebar. Enables grab anywhere so you can move it
@ -19704,7 +19879,7 @@ Parameter Descriptions:
|Type|Name|Meaning| |Type|Name|Meaning|
|--|--|--| |--|--|--|
| str | command | Filename to load settings from (and save to in the future) | | str | command | The command/file to execute. What you would type at a console to run a program or shell command. |
| Any | *args | Variable number of arguments that are passed to the program being started as command line parms | | Any | *args | Variable number of arguments that are passed to the program being started as command line parms |
| bool | wait | If True then wait for the subprocess to finish | | bool | wait | If True then wait for the subprocess to finish |
| str | cwd | Working directory to use when executing the subprocess | | str | cwd | Working directory to use when executing the subprocess |
@ -19960,7 +20135,8 @@ set_options(icon = None,
sbar_relief = None, sbar_relief = None,
alpha_channel = None, alpha_channel = None,
hide_window_when_creating = None, hide_window_when_creating = None,
use_button_shortcuts = None) use_button_shortcuts = None,
watermark_text = None)
``` ```
Parameter Descriptions: Parameter Descriptions:
@ -20033,6 +20209,7 @@ Parameter Descriptions:
| float | alpha_channel | Default alpha channel to be used on all windows | | float | alpha_channel | Default alpha channel to be used on all windows |
| bool | hide_window_when_creating | If True then alpha will be set to 0 while a window is made and moved to location indicated | | bool | hide_window_when_creating | If True then alpha will be set to 0 while a window is made and moved to location indicated |
| bool | use_button_shortcuts | If True then Shortcut Char will be used with Buttons | | bool | use_button_shortcuts | If True then Shortcut Char will be used with Buttons |
| str | watermark_text | Set the text that will be used if a window is watermarked |
| None | **RETURN** | None | None | **RETURN** | None
### Non PEP8 versions ### Non PEP8 versions
@ -20116,7 +20293,8 @@ SetOptions(icon = None,
sbar_relief = None, sbar_relief = None,
alpha_channel = None, alpha_channel = None,
hide_window_when_creating = None, hide_window_when_creating = None,
use_button_shortcuts = None) use_button_shortcuts = None,
watermark_text = None)
``` ```
Parameter Descriptions: Parameter Descriptions:
@ -20189,6 +20367,7 @@ Parameter Descriptions:
| float | alpha_channel | Default alpha channel to be used on all windows | | float | alpha_channel | Default alpha channel to be used on all windows |
| bool | hide_window_when_creating | If True then alpha will be set to 0 while a window is made and moved to location indicated | | bool | hide_window_when_creating | If True then alpha will be set to 0 while a window is made and moved to location indicated |
| bool | use_button_shortcuts | If True then Shortcut Char will be used with Buttons | | bool | use_button_shortcuts | If True then Shortcut Char will be used with Buttons |
| str | watermark_text | Set the text that will be used if a window is watermarked |
| None | **RETURN** | None | None | **RETURN** | None
## Old Themes (Look and Feel) - Replaced by theme() ## Old Themes (Look and Feel) - Replaced by theme()

View file

@ -1,7 +1,7 @@
<div style="display: flex; gap: 50px; justify-content: center;"> <div style="display: flex; gap: 50px; justify-content: center;">
<div> <div>
<img src="https://raw.githubusercontent.com/PySimpleGUI/PySimpleGUI/master/images/for_readme/Logo%20with%20text%20for%20GitHub%20Top.png" alt="Python GUIs for Humans"> <img src="https://raw.githubusercontent.com/PySimpleGUI/PySimpleGUI/master/images/for_readme/Logo%20with%20text%20for%20GitHub%20Top.png" alt="User Interfaces for Humans">
<h1 style="text-align: center;">Python GUIs for Humans</h1> <h1 style="text-align: center;">User Interfaces for Humans<sup>TM</sup></h1>
</div> </div>
<div> <div>
<div> <div>
@ -25,9 +25,9 @@
<span style="font-weight: normal;"> <span style="font-weight: normal;">
apply coupon for discount: apply coupon for discount:
</span> </span>
266B9C51C90B3728782E 522B20BF5EF123C4AB30
</div> </div>
<button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=266B9C51C90B3728782E','_blank');"> <button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=522B20BF5EF123C4AB30','_blank');">
click here to visit course page click here to visit course page
</button> </button>
</div> </div>

View file

@ -1,7 +1,7 @@
<div style="display: flex; gap: 50px; justify-content: center;"> <div style="display: flex; gap: 50px; justify-content: center;">
<div> <div>
<img src="https://raw.githubusercontent.com/PySimpleGUI/PySimpleGUI/master/images/for_readme/Logo%20with%20text%20for%20GitHub%20Top.png" alt="Python GUIs for Humans"> <img src="https://raw.githubusercontent.com/PySimpleGUI/PySimpleGUI/master/images/for_readme/Logo%20with%20text%20for%20GitHub%20Top.png" alt="User Interfaces for Humans">
<h1 style="text-align: center;">Python GUIs for Humans</h1> <h1 style="text-align: center;">User Interfaces for Humans<sup>TM</sup></h1>
</div> </div>
<div> <div>
<div> <div>
@ -25,9 +25,9 @@
<span style="font-weight: normal;"> <span style="font-weight: normal;">
apply coupon for discount: apply coupon for discount:
</span> </span>
266B9C51C90B3728782E 522B20BF5EF123C4AB30
</div> </div>
<button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=266B9C51C90B3728782E','_blank');"> <button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=522B20BF5EF123C4AB30','_blank');">
click here to visit course page click here to visit course page
</button> </button>
</div> </div>
@ -57,7 +57,7 @@
# PySimpleGUI User's Manual # PySimpleGUI User's Manual
## Python GUI For Humans - Transforms tkinter, Qt, Remi, WxPython into portable people-friendly Pythonic interfaces ## User Interfaces for Humans - Transforms tkinter, Qt, Remi, WxPython into portable people-friendly Pythonic interfaces
## <span>The Call Reference Section Moved to <a href="https://pysimplegui.readthedocs.io/en/latest/call%20reference/">here</a></span> ## <span>The Call Reference Section Moved to <a href="https://pysimplegui.readthedocs.io/en/latest/call%20reference/">here</a></span>
@ -2028,7 +2028,8 @@ popup_animated(image_source,
time_between_frames = 0, time_between_frames = 0,
transparent_color = None, transparent_color = None,
title = "", title = "",
icon = None) icon = None,
no_buffering = False)
``` ```
Parameter Descriptions: Parameter Descriptions:
@ -2050,6 +2051,7 @@ Parameter Descriptions:
| str | transparent_color | This color will be completely see-through in your window. Can even click through | | str | transparent_color | This color will be completely see-through in your window. Can even click through |
| str | title | Title that will be shown on the window | | str | title | Title that will be shown on the window |
| str or bytes | icon | Same as Window icon parameter. Can be either a filename or Base64 byte string. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO | | str or bytes | icon | Same as Window icon parameter. Can be either a filename or Base64 byte string. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO |
| bool | no_buffering | If True then no buffering will be used for the GIF. May work better if you have a large animation |
| bool | **RETURN** | True if the window updated OK. False if the window was closed | bool | **RETURN** | True if the window updated OK. False if the window was closed
***To close animated popups***, call PopupAnimated with `image_source=None`. This will close all of the currently open PopupAnimated windows. ***To close animated popups***, call PopupAnimated with `image_source=None`. This will close all of the currently open PopupAnimated windows.
@ -2078,11 +2080,11 @@ Parameter Descriptions:
|Type|Name|Meaning| |Type|Name|Meaning|
|--|--|--| |--|--|--|
| str | title | text to display in eleemnt | | str | title | text to display in titlebar of window |
| int | current_value | current value | | int | current_value | current value |
| int | max_value | max value of QuickMeter | | int | max_value | max value of progress meter |
| Any | *args | stuff to output | | Any | *args | stuff to output as text in the window along with the meter |
| str or int or tuple or object | key | Used to differentiate between mutliple meters. Used to cancel meter early. Now optional as there is a default value for single meters | | str or int or tuple or object | key | Used to differentiate between multiple meters. Used to cancel meter early. Now optional as there is a default value for single meters |
| str | orientation | 'horizontal' or 'vertical' ('h' or 'v' work) (Default value = 'vertical' / 'v') | | str | orientation | 'horizontal' or 'vertical' ('h' or 'v' work) (Default value = 'vertical' / 'v') |
| (str, str) or str | bar_color | The 2 colors that make up a progress bar. Either a tuple of 2 strings or a string. Tuple - (bar, background). A string with 1 color changes the background of the bar only. A string with 2 colors separated by "on" like "red on blue" specifies a red bar on a blue background. | | (str, str) or str | bar_color | The 2 colors that make up a progress bar. Either a tuple of 2 strings or a string. Tuple - (bar, background). A string with 1 color changes the background of the bar only. A string with 2 colors separated by "on" like "red on blue" specifies a red bar on a blue background. |
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
@ -7112,12 +7114,54 @@ There are a number of demo programs that show how to use UserSettings to create
If you're using the default path, remember that previous runs of your file may have old settings that are still in your settings file. It can get confusing when you've forgotten that you previously wrote a setting. Not seeing the filename can have drawbacks like this. If you're using the default path, remember that previous runs of your file may have old settings that are still in your settings file. It can get confusing when you've forgotten that you previously wrote a setting. Not seeing the filename can have drawbacks like this.
Also, because the settings automatically save after every update, it can be easy to accidently overwrite a previously saved setting. If you want to avoid this, then perhaps it's best that you work with a dictionary within your code and then explicitly save your dictionary when you're ready to commit it to disk. Also, because the settings automatically save after every update, it can be easy to accidentally overwrite a previously saved setting. If you want to avoid this, then perhaps it's best that you work with a dictionary within your code and then explicitly save your dictionary when you're ready to commit it to disk.
To save your Python dictionary to a settings file, simply call `user_settings_write_new_dictionary(dict)`, passing in your dictionary as the parameter. To save your Python dictionary to a settings file, simply call `user_settings_write_new_dictionary(dict)`, passing in your dictionary as the parameter.
------------------------- -------------------------
# Timer API
The Timer API calls are in version 4.61.0 that is currently only available on the PySimpleGUI GitHub. It has not been released to PyPI yet.
## Do Not Use Sleeps In Your Event Loop...
Instead of sleeping, you can request that an event be generated after some period of time. If you need to "Sleep for 3 seconds" as part of some operation, instead schedule a timer for 3 seconds. Your `window.read` call will return a value of `sg.TIMER_KEY` or `sg.EVENT_TIMER` (they are aliases and thus have the same value).
## Timer API Calls
These are the API calls that you'll use to manage timers:
`window.timer_start` starts a timer
`window.timer_stop` stops a single timer
`window.timer_stop_all` stops all timers
`window.timer_get_active_timers` returns a list of active timer IDs
Example - start a 3 second timer that does not repeat:
```python
window.timer_start(3000, repeating=False) # start a 3-second timer
```
When this timer expires, you'll get an event `sg.EVENT_TIMER`. If you want to specify your own key to be returned, then use the `key` parameter:
```python
window.timer_start(3000, key='-MY TIMER KEY-', repeating=False)
```
See the call reference for the details of each call.
## Timer Demo Programs
Using the PySimpleGUI Demo Browser, search for `window.timer_` to find Demo Programs that use the Timer API calls.
The program `Demo_WindowTimer.py` demonstrates both repeating and non-repeating timers as well as using custom keys. It's a simple set of API calls to use and the docstrings in combination with the Demo Programs should give you all you need to start using this capability.
---------------------------
# Extending PySimpleGUI # Extending PySimpleGUI
PySimpleGUI doesn't and can't provide every single setting available in the underlying GUI framework. Not all tkinter options are available for a `Text` Element. Same with PySimpleGUIQt and the other ports. PySimpleGUI doesn't and can't provide every single setting available in the underlying GUI framework. Not all tkinter options are available for a `Text` Element. Same with PySimpleGUIQt and the other ports.
@ -10092,6 +10136,22 @@ Test Harness and Settings Windows fit on small screens better
* Emergency Patch Release for Mac OS 12.3 and greater * Emergency Patch Release for Mac OS 12.3 and greater
* Fixed bug in Mac OS version check in yesterday's 4.60.2 release * Fixed bug in Mac OS version check in yesterday's 4.60.2 release
## 4.60.4 PySimpleGUI 10-Oct-2022
* Dot release to quickly fix the Trinket detection which stopped working recently
## 4.60.5 PySimpleGUI 21-May-2023
* Mac fixes
* Fix for Input Element not working in no-titlebar windows on MacOs 13.2.1
* Change to the 0.99 Alpha fix made in 4.60.2. Now only applies patch when running on 8.6.12, regardless of Mac Control Panel setting in PySimpleGUI Global Settings. Removes the need for users to disable when upgrading tkinter.
* Added Intelligent Upgrade Service - inform users when there are releases of PySimpleGUI that fix a problem that may be unique to their combination of components
* Change to GitHub Issue GUI
* Added checkbox for checking if running latest PyPI version
* Recommended using Demo Browser to search Demo Programs
* Use platform module to fill in the OS information field
* SDK Help Window - changed all readthedocs links to use the PySimpleGUI.org hostname for better portability
## Code Condition ## Code Condition
Make it run Make it run

View file

@ -1,6 +1,6 @@
<p align="center"> <p align="center">
<img src="https://raw.githubusercontent.com/PySimpleGUI/PySimpleGUI/master/images/for_readme/Logo%20with%20text%20for%20GitHub%20Top.png" alt="Python GUIs for Humans"> <img src="https://raw.githubusercontent.com/PySimpleGUI/PySimpleGUI/master/images/for_readme/Logo%20with%20text%20for%20GitHub%20Top.png" alt="User Interfaces for Humans">
<h2 align="center">Python GUIs for Humans</h2> <h2 align="center">User Interfaces for Humans<sup>TM</sup></h2>
</p> </p>
<table> <table>
@ -9,8 +9,8 @@
<img src="https://www.dropbox.com/s/6wzf3ebmj97v4zs/PySimpleGUI-GitHub-Udemy-Course.png?raw=1" width=200 alt="PySimpleGUI Udemy Course"> <img src="https://www.dropbox.com/s/6wzf3ebmj97v4zs/PySimpleGUI-GitHub-Udemy-Course.png?raw=1" width=200 alt="PySimpleGUI Udemy Course">
</td> </td>
<td> <td>
<h5>apply coupon for discount:<br>266B9C51C90B3728782E</h6> <h5>apply coupon for discount:<br>522B20BF5EF123C4AB30</h6>
<a href="https://www.udemy.com/course/pysimplegui/?couponCode=266B9C51C90B3728782E">click here to visit course page</a> <a href="https://www.udemy.com/course/pysimplegui/?couponCode=522B20BF5EF123C4AB30">click here to visit course page</a>
</td> </td>
</tr> </tr>
</table> </table>

View file

@ -1,6 +1,6 @@
<p align="center"> <p align="center">
<img src="https://raw.githubusercontent.com/PySimpleGUI/PySimpleGUI/master/images/for_readme/Logo%20with%20text%20for%20GitHub%20Top.png" alt="Python GUIs for Humans"> <img src="https://raw.githubusercontent.com/PySimpleGUI/PySimpleGUI/master/images/for_readme/Logo%20with%20text%20for%20GitHub%20Top.png" alt="User Interfaces for Humans">
<h2 align="center">Python GUIs for Humans</h2> <h2 align="center">User Interfaces for Humans<sup>TM</sup></h2>
</p> </p>
<table> <table>
@ -9,8 +9,8 @@
<img src="https://www.dropbox.com/s/6wzf3ebmj97v4zs/PySimpleGUI-GitHub-Udemy-Course.png?raw=1" width=200 alt="PySimpleGUI Udemy Course"> <img src="https://www.dropbox.com/s/6wzf3ebmj97v4zs/PySimpleGUI-GitHub-Udemy-Course.png?raw=1" width=200 alt="PySimpleGUI Udemy Course">
</td> </td>
<td> <td>
<h5>apply coupon for discount:<br>266B9C51C90B3728782E</h6> <h5>apply coupon for discount:<br>522B20BF5EF123C4AB30</h6>
<a href="https://www.udemy.com/course/pysimplegui/?couponCode=266B9C51C90B3728782E">click here to visit course page</a> <a href="https://www.udemy.com/course/pysimplegui/?couponCode=522B20BF5EF123C4AB30">click here to visit course page</a>
</td> </td>
</tr> </tr>
</table> </table>

View file

@ -27,8 +27,8 @@ HOW DO I INSERT IMAGES ???
<div style="display: flex; gap: 50px; justify-content: center;"> <div style="display: flex; gap: 50px; justify-content: center;">
<div> <div>
<img src="https://raw.githubusercontent.com/PySimpleGUI/PySimpleGUI/master/images/for_readme/Logo%20with%20text%20for%20GitHub%20Top.png" alt="Python GUIs for Humans"> <img src="https://raw.githubusercontent.com/PySimpleGUI/PySimpleGUI/master/images/for_readme/Logo%20with%20text%20for%20GitHub%20Top.png" alt="User Interfaces for Humans">
<h1 style="text-align: center;">Python GUIs for Humans</h1> <h1 style="text-align: center;">User Interfaces for Humans<sup>TM</sup></h1>
</div> </div>
<div> <div>
<div> <div>
@ -52,9 +52,9 @@ HOW DO I INSERT IMAGES ???
<span style="font-weight: normal;"> <span style="font-weight: normal;">
apply coupon for discount: apply coupon for discount:
</span> </span>
266B9C51C90B3728782E 522B20BF5EF123C4AB30
</div> </div>
<button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=266B9C51C90B3728782E','_blank');"> <button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=522B20BF5EF123C4AB30','_blank');">
click here to visit course page click here to visit course page
</button> </button>
</div> </div>
@ -96,7 +96,7 @@ HOW DO I INSERT IMAGES ???
# PySimpleGUI User's Manual # PySimpleGUI User's Manual
## Python GUI For Humans - Transforms tkinter, Qt, Remi, WxPython into portable people-friendly Pythonic interfaces ## User Interfaces for Humans - Transforms tkinter, Qt, Remi, WxPython into portable people-friendly Pythonic interfaces
## <span>The Call Reference Section Moved to <a href="https://pysimplegui.readthedocs.io/en/latest/call%20reference/">here</a></span> ## <span>The Call Reference Section Moved to <a href="https://pysimplegui.readthedocs.io/en/latest/call%20reference/">here</a></span>

View file

@ -5574,13 +5574,60 @@ There are a number of demo programs that show how to use UserSettings to create
If you're using the default path, remember that previous runs of your file may have old settings that are still in your settings file. It can get confusing when you've forgotten that you previously wrote a setting. Not seeing the filename can have drawbacks like this. If you're using the default path, remember that previous runs of your file may have old settings that are still in your settings file. It can get confusing when you've forgotten that you previously wrote a setting. Not seeing the filename can have drawbacks like this.
Also, because the settings automatically save after every update, it can be easy to accidently overwrite a previously saved setting. If you want to avoid this, then perhaps it's best that you work with a dictionary within your code and then explicitly save your dictionary when you're ready to commit it to disk. Also, because the settings automatically save after every update, it can be easy to accidentally overwrite a previously saved setting. If you want to avoid this, then perhaps it's best that you work with a dictionary within your code and then explicitly save your dictionary when you're ready to commit it to disk.
To save your Python dictionary to a settings file, simply call `user_settings_write_new_dictionary(dict)`, passing in your dictionary as the parameter. To save your Python dictionary to a settings file, simply call `user_settings_write_new_dictionary(dict)`, passing in your dictionary as the parameter.
------------------------- -------------------------
# Timer API
The Timer API calls are in version 4.61.0 that is currently only available on the PySimpleGUI GitHub. It has not been released to PyPI yet.
## Do Not Use Sleeps In Your Event Loop...
Instead of sleeping, you can request that an event be generated after some period of time. If you need to "Sleep for 3 seconds" as part of some operation, instead schedule a timer for 3 seconds. Your `window.read` call will return a value of `sg.TIMER_KEY` or `sg.EVENT_TIMER` (they are aliases and thus have the same value).
## Timer API Calls
These are the API calls that you'll use to manage timers:
`window.timer_start` starts a timer
`window.timer_stop` stops a single timer
`window.timer_stop_all` stops all timers
`window.timer_get_active_timers` returns a list of active timer IDs
Example - start a 3 second timer that does not repeat:
```python
window.timer_start(3000, repeating=False) # start a 3-second timer
```
When this timer expires, you'll get an event `sg.EVENT_TIMER`. If you want to specify your own key to be returned, then use the `key` parameter:
```python
window.timer_start(3000, key='-MY TIMER KEY-', repeating=False)
```
See the call reference for the details of each call.
## Timer Demo Programs
Using the PySimpleGUI Demo Browser, search for `window.timer_` to find Demo Programs that use the Timer API calls.
The program `Demo_WindowTimer.py` demonstrates both repeating and non-repeating timers as well as using custom keys. It's a simple set of API calls to use and the docstrings in combination with the Demo Programs should give you all you need to start using this capability.
---------------------------
# Extending PySimpleGUI # Extending PySimpleGUI

View file

@ -2590,6 +2590,25 @@ Test Harness and Settings Windows fit on small screens better
* Emergency Patch Release for Mac OS 12.3 and greater * Emergency Patch Release for Mac OS 12.3 and greater
* Fixed bug in Mac OS version check in yesterday's 4.60.2 release * Fixed bug in Mac OS version check in yesterday's 4.60.2 release
## 4.60.4 PySimpleGUI 10-Oct-2022
* Dot release to quickly fix the Trinket detection which stopped working recently
## 4.60.5 PySimpleGUI 21-May-2023
* Mac fixes
* Fix for Input Element not working in no-titlebar windows on MacOs 13.2.1
* Change to the 0.99 Alpha fix made in 4.60.2. Now only applies patch when running on 8.6.12, regardless of Mac Control Panel setting in PySimpleGUI Global Settings. Removes the need for users to disable when upgrading tkinter.
* Added Intelligent Upgrade Service - inform users when there are releases of PySimpleGUI that fix a problem that may be unique to their combination of components
* Change to GitHub Issue GUI
* Added checkbox for checking if running latest PyPI version
* Recommended using Demo Browser to search Demo Programs
* Use platform module to fill in the OS information field
* SDK Help Window - changed all readthedocs links to use the PySimpleGUI.org hostname for better portability
## Code Condition ## Code Condition

View file

@ -25,9 +25,9 @@
<span style="font-weight: normal;"> <span style="font-weight: normal;">
apply coupon for discount: apply coupon for discount:
</span> </span>
266B9C51C90B3728782E 522B20BF5EF123C4AB30.
</div> </div>
<button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=266B9C51C90B3728782E','_blank');"> <button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=522B20BF5EF123C4AB30','_blank');">
click here to visit course page click here to visit course page
</button> </button>
</div> </div>
@ -1111,6 +1111,9 @@ The following methods are here for backwards compatibility reference. You will
### set_focus ### set_focus
<!-- <+Input.set_focus+> --> <!-- <+Input.set_focus+> -->
### set_ibeam_color
<!-- <+Input.set_ibeam_color+> -->
### set_size ### set_size
<!-- <+Input.set_size+> --> <!-- <+Input.set_size+> -->
@ -1204,12 +1207,18 @@ The following methods are here for backwards compatibility reference. You will
### metadata ### metadata
<!-- <+Listbox.metadata+> --> <!-- <+Listbox.metadata+> -->
### select_index
<!-- <+Listbox.select_index+> -->
### set_cursor ### set_cursor
<!-- <+Listbox.set_cursor+> --> <!-- <+Listbox.set_cursor+> -->
### set_focus ### set_focus
<!-- <+Listbox.set_focus+> --> <!-- <+Listbox.set_focus+> -->
### set_index_color
<!-- <+Listbox.set_index_color+> -->
### set_size ### set_size
<!-- <+Listbox.set_size+> --> <!-- <+Listbox.set_size+> -->
@ -1421,6 +1430,9 @@ See the Column element to get a list of method calls available. The function re
### set_focus ### set_focus
<!-- <+Multiline.set_focus+> --> <!-- <+Multiline.set_focus+> -->
### set_ibeam_color
<!-- <+Input.set_ibeam_color+> -->
### set_size ### set_size
<!-- <+Multiline.set_size+> --> <!-- <+Multiline.set_size+> -->
@ -1557,11 +1569,11 @@ The following methods are here for backwards compatibility reference. You will
--------- ---------
## Output Element (No longer recommended - USE `Multiline` instead) ## Output Element
Rather than use the `Output` element, it's recommended that you use the `Multiline` element instead. The reason for this is that more controls have been added to the Multiline and in the future you can expect more features will be added to the Multiline while the `Output` element has stopped being enhanced. Output Element - a multi-lined text area to where stdout, stderr, cprint are rerouted.
You can control which Multiline Element receives your stdout output as well as use the color-print (`cprint`) with a Multiline. Now based on the `Multiline` element
<!-- <+Output.doc+> --> <!-- <+Output.doc+> -->
<!-- <+Output.__init__+> --> <!-- <+Output.__init__+> -->
@ -2162,6 +2174,9 @@ The following methods are here for backwards compatibility reference. You will
### set_focus ### set_focus
<!-- <+Spin.set_focus+> --> <!-- <+Spin.set_focus+> -->
### set_ibeam_color
<!-- <+Input.set_ibeam_color+> -->
### set_size ### set_size
<!-- <+Spin.set_size+> --> <!-- <+Spin.set_size+> -->
@ -3040,6 +3055,18 @@ Example: If first row has a `VPush`, then your layout will be At the bottom of
### start_thread ### start_thread
<!-- <+Window.start_thread+> --> <!-- <+Window.start_thread+> -->
### timer_get_active_timers
<!-- <+Window.timer_get_active_timers+> -->
### timer_start
<!-- <+Window.timer_start+> -->
### timer_stop
<!-- <+Window.timer_stop+> -->
### timer_stop_all
<!-- <+Window.timer_stop_all+> -->
### un_hide ### un_hide
<!-- <+Window.un_hide+> --> <!-- <+Window.un_hide+> -->

View file

@ -25,9 +25,9 @@
<span style="font-weight: normal;"> <span style="font-weight: normal;">
apply coupon for discount: apply coupon for discount:
</span> </span>
266B9C51C90B3728782E 522B20BF5EF123C4AB30.
</div> </div>
<button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=266B9C51C90B3728782E','_blank');"> <button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=522B20BF5EF123C4AB30','_blank');">
click here to visit course page click here to visit course page
</button> </button>
</div> </div>
@ -126,7 +126,7 @@ Parameter Descriptions:
| (str, str) or str | mouseover_colors | Important difference between Linux & Windows! Linux - Colors when mouse moved over button. Windows - colors when button is pressed. The default is to switch the text and background colors (an inverse effect) | | (str, str) or str | mouseover_colors | Important difference between Linux & Windows! Linux - Colors when mouse moved over button. Windows - colors when button is pressed. The default is to switch the text and background colors (an inverse effect) |
| bool | use_ttk_buttons | True = use ttk buttons. False = do not use ttk buttons. None (Default) = use ttk buttons only if on a Mac and not with button images | | bool | use_ttk_buttons | True = use ttk buttons. False = do not use ttk buttons. None (Default) = use ttk buttons only if on a Mac and not with button images |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| bool | bind_return_key | If True the return key will cause this button to be pressed | | bool | bind_return_key | If True then pressing the return key in an Input or Multiline Element will cause this button to appear to be clicked (generates event with this button's key |
| bool | focus | if True, initial focus will be put on this button | | bool | focus | if True, initial focus will be put on this button |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
@ -1305,6 +1305,7 @@ Checkbox(text,
background_color = None, background_color = None,
text_color = None, text_color = None,
checkbox_color = None, checkbox_color = None,
highlight_thickness = 1,
change_submits = False, change_submits = False,
enable_events = False, enable_events = False,
disabled = False, disabled = False,
@ -1333,6 +1334,7 @@ Parameter Descriptions:
| str | background_color | color of background | | str | background_color | color of background |
| str | text_color | color of the text | | str | text_color | color of the text |
| str | checkbox_color | color of background of the box that has the check mark in it. The checkmark is the same color as the text | | str | checkbox_color | color of background of the box that has the check mark in it. The checkmark is the same color as the text |
| int | highlight_thickness | thickness of border around checkbox when gets focus |
| bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | | bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead |
| bool | enable_events | Turns on the element specific events. Checkbox events happen when an item changes | | bool | enable_events | Turns on the element specific events. Checkbox events happen when an item changes |
| bool | disabled | set disable state | | bool | disabled | set disable state |
@ -2214,7 +2216,7 @@ Parameter Descriptions:
| str | text_color | color of the text | | str | text_color | color of the text |
| str | button_background_color | The color of the background of the button on the combo box | | str | button_background_color | The color of the background of the button on the combo box |
| str | button_arrow_color | The color of the arrow on the button on the combo box | | str | button_arrow_color | The color of the arrow on the button on the combo box |
| bool | bind_return_key | If True, then the return key will cause a the Combo to generate an event | | bool | bind_return_key | If True, then the return key will cause a the Combo to generate an event when return key is pressed |
| bool | change_submits | DEPRICATED DO NOT USE. Use `enable_events` instead | | bool | change_submits | DEPRICATED DO NOT USE. Use `enable_events` instead |
| bool | enable_events | Turns on the element specific events. Combo event is when a choice is made | | bool | enable_events | Turns on the element specific events. Combo event is when a choice is made |
| bool | enable_per_char_events | Enables generation of events for every character that's input. This is like the Input element's events | | bool | enable_per_char_events | Enables generation of events for every character that's input. This is like the Input element's events |
@ -2481,7 +2483,9 @@ update(value = None,
font = None, font = None,
visible = None, visible = None,
size = (None, None), size = (None, None),
select = None) select = None,
text_color = None,
background_color = None)
``` ```
Parameter Descriptions: Parameter Descriptions:
@ -2497,6 +2501,8 @@ Parameter Descriptions:
| bool | visible | control visibility of element | | bool | visible | control visibility of element |
| (int, int) | size | width, height. Width = characters-wide, height = NOTE it's the number of entries to show in the list | | (int, int) | size | width, height. Width = characters-wide, height = NOTE it's the number of entries to show in the list |
| bool | select | if True, then the text will be selected, if False then selection will be cleared | | bool | select | if True, then the text will be selected, if False then selection will be cleared |
| str | background_color | color of background |
| str | text_color | color of the text |
### visible ### visible
@ -2586,7 +2592,9 @@ Update(value = None,
font = None, font = None,
visible = None, visible = None,
size = (None, None), size = (None, None),
select = None) select = None,
text_color = None,
background_color = None)
``` ```
Parameter Descriptions: Parameter Descriptions:
@ -2602,6 +2610,8 @@ Parameter Descriptions:
| bool | visible | control visibility of element | | bool | visible | control visibility of element |
| (int, int) | size | width, height. Width = characters-wide, height = NOTE it's the number of entries to show in the list | | (int, int) | size | width, height. Width = characters-wide, height = NOTE it's the number of entries to show in the list |
| bool | select | if True, then the text will be selected, if False then selection will be cleared | | bool | select | if True, then the text will be selected, if False then selection will be cleared |
| str | background_color | color of background |
| str | text_color | color of the text |
--------- ---------
@ -4881,6 +4891,8 @@ Input(default_text = "",
readonly = False, readonly = False,
disabled_readonly_background_color = None, disabled_readonly_background_color = None,
disabled_readonly_text_color = None, disabled_readonly_text_color = None,
selected_text_color = None,
selected_background_color = None,
expand_x = False, expand_x = False,
expand_y = False, expand_y = False,
right_click_menu = None, right_click_menu = None,
@ -4915,6 +4927,8 @@ Parameter Descriptions:
| bool | readonly | If True tkinter state set to 'readonly'. Use this in place of use_readonly_for_disable as another way of achieving readonly. Note cannot set BOTH readonly and disabled as tkinter only supplies a single flag | | bool | readonly | If True tkinter state set to 'readonly'. Use this in place of use_readonly_for_disable as another way of achieving readonly. Note cannot set BOTH readonly and disabled as tkinter only supplies a single flag |
| str | disabled_readonly_background_color | If state is set to readonly or disabled, the color to use for the background | | str | disabled_readonly_background_color | If state is set to readonly or disabled, the color to use for the background |
| str | disabled_readonly_text_color | If state is set to readonly or disabled, the color to use for the text | | str | disabled_readonly_text_color | If state is set to readonly or disabled, the color to use for the text |
| str | selected_text_color | Color of text when it is selected (using mouse or control+A, etc) |
| str | selected_background_color | Color of background when it is selected (using mouse or control+A, etc) |
| bool | expand_x | If True the element will automatically expand in the X direction to fill available space | | bool | expand_x | If True the element will automatically expand in the X direction to fill available space |
| bool | expand_y | If True the element will automatically expand in the Y direction to fill available space | | bool | expand_y | If True the element will automatically expand in the Y direction to fill available space |
| List[List[ List[str] or str ]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. | | List[List[ List[str] or str ]] | right_click_menu | A list of lists of Menu items to show when this element is right clicked. See user docs for exact format. |
@ -5096,6 +5110,22 @@ Parameter Descriptions:
|--|--|--| |--|--|--|
| bool | force | if True will call focus_force otherwise calls focus_set | | bool | force | if True will call focus_force otherwise calls focus_set |
### set_ibeam_color
Sets the color of the I-Beam that is used to "insert" characters. This is oftens called a "Cursor" by
many users. To keep from being confused with tkinter's definition of cursor (the mouse pointer), the term
ibeam is used in this case.
```
set_ibeam_color(ibeam_color = None)
```
Parameter Descriptions:
|Type|Name|Meaning|
|--|--|--|
| str | ibeam_color | color to set the "I-Beam" used to indicate where characters will be inserted |
### set_size ### set_size
Changes the size of an element to a specific size. Changes the size of an element to a specific size.
@ -5359,7 +5389,7 @@ Parameter Descriptions:
| [enum] | select_mode | Select modes are used to determine if only 1 item can be selected or multiple and how they can be selected. Valid choices begin with "LISTBOX_SELECT_MODE_" and include: LISTBOX_SELECT_MODE_SINGLE LISTBOX_SELECT_MODE_MULTIPLE LISTBOX_SELECT_MODE_BROWSE LISTBOX_SELECT_MODE_EXTENDED | | [enum] | select_mode | Select modes are used to determine if only 1 item can be selected or multiple and how they can be selected. Valid choices begin with "LISTBOX_SELECT_MODE_" and include: LISTBOX_SELECT_MODE_SINGLE LISTBOX_SELECT_MODE_MULTIPLE LISTBOX_SELECT_MODE_BROWSE LISTBOX_SELECT_MODE_EXTENDED |
| bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | | bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead |
| bool | enable_events | Turns on the element specific events. Listbox generates events when an item is clicked | | bool | enable_events | Turns on the element specific events. Listbox generates events when an item is clicked |
| bool | bind_return_key | If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | If True, then the return key will cause a the Listbox to generate an event when return key is pressed |
| (int, int) or (int, None) or int | size | w=characters-wide, h=rows-high. If an int instead of a tuple is supplied, then height is auto-set to 1 | | (int, int) or (int, None) or int | size | w=characters-wide, h=rows-high. If an int instead of a tuple is supplied, then height is auto-set to 1 |
| (int, int) or (None, None) or int | s | Same as size parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, size will be used | | (int, int) or (None, None) or int | s | Same as size parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, size will be used |
| bool | disabled | set disable state for element | | bool | disabled | set disable state for element |
@ -5553,6 +5583,24 @@ Metadata is an Element property that you can use at any time to hold any value
|---|---|---| |---|---|---|
|(Any)| **return** | the current metadata value | |(Any)| **return** | the current metadata value |
### select_index
Selects an index while providing capability to setting the selected color for the index to specific text/background color
```
select_index(index,
highlight_text_color = None,
highlight_background_color = None)
```
Parameter Descriptions:
|Type|Name|Meaning|
|--|--|--|
| int | index | specifies which item to change. index starts at 0 and goes to length of values list minus one |
| str | highlight_text_color | color of the text when this item is selected. |
| str | highlight_background_color | color of the background when this item is selected |
### set_cursor ### set_cursor
Sets the cursor for the current Element. Sets the cursor for the current Element.
@ -5586,6 +5634,28 @@ Parameter Descriptions:
|--|--|--| |--|--|--|
| bool | force | if True will call focus_force otherwise calls focus_set | | bool | force | if True will call focus_force otherwise calls focus_set |
### set_index_color
Sets the color of a specific item without selecting it
```
set_index_color(index,
text_color = None,
background_color = None,
highlight_text_color = None,
highlight_background_color = None)
```
Parameter Descriptions:
|Type|Name|Meaning|
|--|--|--|
| int | index | specifies which item to change. index starts at 0 and goes to length of values list minus one |
| str | text_color | color of the text for this item |
| str | background_color | color of the background for this item |
| str | highlight_text_color | color of the text when this item is selected. |
| str | highlight_background_color | color of the background when this item is selected |
### set_size ### set_size
Changes the size of an element to a specific size. Changes the size of an element to a specific size.
@ -6244,12 +6314,15 @@ Multiline(default_text = "",
enter_submits = False, enter_submits = False,
disabled = False, disabled = False,
autoscroll = False, autoscroll = False,
autoscroll_only_at_bottom = False,
border_width = None, border_width = None,
size = (None, None), size = (None, None),
s = (None, None), s = (None, None),
auto_size_text = None, auto_size_text = None,
background_color = None, background_color = None,
text_color = None, text_color = None,
selected_text_color = None,
selected_background_color = None,
horizontal_scroll = False, horizontal_scroll = False,
change_submits = False, change_submits = False,
enable_events = False, enable_events = False,
@ -6293,12 +6366,15 @@ Parameter Descriptions:
| bool | enter_submits | if True, the Window.read call will return is enter key is pressed in this element | | bool | enter_submits | if True, the Window.read call will return is enter key is pressed in this element |
| bool | disabled | set disable state | | bool | disabled | set disable state |
| bool | autoscroll | If True the contents of the element will automatically scroll as more data added to the end | | bool | autoscroll | If True the contents of the element will automatically scroll as more data added to the end |
| bool | autoscroll_only_at_bottom | If True the contents of the element will automatically scroll only if the scrollbar is at the bottom of the multiline |
| int | border_width | width of border around element in pixels | | int | border_width | width of border around element in pixels |
| (int, int) or (None, None) or int | size | (w, h) w=characters-wide, h=rows-high. If an int instead of a tuple is supplied, then height is auto-set to 1 | | (int, int) or (None, None) or int | size | (w, h) w=characters-wide, h=rows-high. If an int instead of a tuple is supplied, then height is auto-set to 1 |
| (int, int) or (None, None) or int | s | Same as size parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, size will be used | | (int, int) or (None, None) or int | s | Same as size parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, size will be used |
| bool | auto_size_text | if True will size the element to match the length of the text | | bool | auto_size_text | if True will size the element to match the length of the text |
| str | background_color | color of background | | str | background_color | color of background |
| str | text_color | color of the text | | str | text_color | color of the text |
| str | selected_text_color | Color of text when it is selected (using mouse or control+A, etc) |
| str | selected_background_color | Color of background when it is selected (using mouse or control+A, etc) |
| bool | horizontal_scroll | Controls if a horizontal scrollbar should be shown. If True a horizontal scrollbar will be shown in addition to vertical | | bool | horizontal_scroll | Controls if a horizontal scrollbar should be shown. If True a horizontal scrollbar will be shown in addition to vertical |
| bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | | bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead |
| bool | enable_events | If True then any key press that happens when the element has focus will generate an event. | | bool | enable_events | If True then any key press that happens when the element has focus will generate an event. |
@ -6590,6 +6666,22 @@ Parameter Descriptions:
|--|--|--| |--|--|--|
| bool | force | if True will call focus_force otherwise calls focus_set | | bool | force | if True will call focus_force otherwise calls focus_set |
### set_ibeam_color
Sets the color of the I-Beam that is used to "insert" characters. This is oftens called a "Cursor" by
many users. To keep from being confused with tkinter's definition of cursor (the mouse pointer), the term
ibeam is used in this case.
```
set_ibeam_color(ibeam_color = None)
```
Parameter Descriptions:
|Type|Name|Meaning|
|--|--|--|
| str | ibeam_color | color to set the "I-Beam" used to indicate where characters will be inserted |
### set_size ### set_size
Changes the size of an element to a specific size. Changes the size of an element to a specific size.
@ -7200,11 +7292,11 @@ Parameter Descriptions:
--------- ---------
## Output Element (No longer recommended - USE `Multiline` instead) ## Output Element
Rather than use the `Output` element, it's recommended that you use the `Multiline` element instead. The reason for this is that more controls have been added to the Multiline and in the future you can expect more features will be added to the Multiline while the `Output` element has stopped being enhanced. Output Element - a multi-lined text area to where stdout, stderr, cprint are rerouted.
You can control which Multiline Element receives your stdout output as well as use the color-print (`cprint`) with a Multiline. Now based on the `Multiline` element
Output Element - a multi-lined text area to where stdout, stderr, cprint are rerouted. Output Element - a multi-lined text area to where stdout, stderr, cprint are rerouted.
@ -7227,6 +7319,7 @@ Output(size = (None, None),
text_color = None, text_color = None,
pad = None, pad = None,
p = None, p = None,
autoscroll_only_at_bottom = False,
echo_stdout_stderr = False, echo_stdout_stderr = False,
font = None, font = None,
tooltip = None, tooltip = None,
@ -7258,6 +7351,7 @@ Parameter Descriptions:
| str | text_color | color of the text | | str | text_color | color of the text |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
| bool | autoscroll_only_at_bottom | If True the contents of the element will automatically scroll only if the scrollbar is at the bottom of the multiline |
| bool | echo_stdout_stderr | If True then output to stdout will be output to this element AND also to the normal console location | | bool | echo_stdout_stderr | If True then output to stdout will be output to this element AND also to the normal console location |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| str | tooltip | text, that will appear when mouse hovers over the element | | str | tooltip | text, that will appear when mouse hovers over the element |
@ -8902,7 +8996,7 @@ Parameter Descriptions:
|--|--|--| |--|--|--|
| int | h_pixels | number of horizontal pixels | | int | h_pixels | number of horizontal pixels |
| int | v_pixels | number of vertical pixels | | int | v_pixels | number of vertical pixels |
| (Column) | **RETURN** | (Column) A column element that has a pad setting set according to parameters | (Canvas) | **RETURN** | (Canvas) A canvas element that has a pad setting set according to parameters
------- -------
@ -9616,7 +9710,7 @@ Parameter Descriptions:
| (int, int) or (None, None) or int | size | (w, h) w=characters-wide, h=rows-high. If an int instead of a tuple is supplied, then height is auto-set to 1 | | (int, int) or (None, None) or int | size | (w, h) w=characters-wide, h=rows-high. If an int instead of a tuple is supplied, then height is auto-set to 1 |
| (int, int) or (None, None) or int | s | Same as size parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, size will be used | | (int, int) or (None, None) or int | s | Same as size parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, size will be used |
| bool | auto_size_text | if True will size the element to match the length of the text | | bool | auto_size_text | if True will size the element to match the length of the text |
| bool | bind_return_key | If True, then the return key will cause a the element to generate an event | | bool | bind_return_key | If True, then the return key will cause a the element to generate an event when return key is pressed |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| str | background_color | color of background | | str | background_color | color of background |
| str | text_color | color of the text | | str | text_color | color of the text |
@ -9809,6 +9903,22 @@ Parameter Descriptions:
|--|--|--| |--|--|--|
| bool | force | if True will call focus_force otherwise calls focus_set | | bool | force | if True will call focus_force otherwise calls focus_set |
### set_ibeam_color
Sets the color of the I-Beam that is used to "insert" characters. This is oftens called a "Cursor" by
many users. To keep from being confused with tkinter's definition of cursor (the mouse pointer), the term
ibeam is used in this case.
```
set_ibeam_color(ibeam_color = None)
```
Parameter Descriptions:
|Type|Name|Meaning|
|--|--|--|
| str | ibeam_color | color to set the "I-Beam" used to indicate where characters will be inserted |
### set_size ### set_size
Changes the size of an element to a specific size. Changes the size of an element to a specific size.
@ -10980,14 +11090,14 @@ Parameter Descriptions:
Returns the current value for the Tab Group, which will be the currently selected tab's KEY or the text on Returns the current value for the Tab Group, which will be the currently selected tab's KEY or the text on
the tab if no key is defined. Returns None if an error occurs. the tab if no key is defined. Returns None if an error occurs.
Note that this is exactly the same data that would be returned from a call to Window.Read. Are you sure you Note that this is exactly the same data that would be returned from a call to Window.read. Are you sure you
are using this method correctly? are using this method correctly?
`get()` `get()`
|Type|Name|Meaning| |Type|Name|Meaning|
|---|---|---| |---|---|---|
|Any | None| **return** | The key of the currently selected tab or the tab's text if it has no key | |Any | None| **return** | The key of the currently selected tab or None if there is an error |
### get_next_focus ### get_next_focus
@ -11212,14 +11322,14 @@ Parameter Descriptions:
Returns the current value for the Tab Group, which will be the currently selected tab's KEY or the text on Returns the current value for the Tab Group, which will be the currently selected tab's KEY or the text on
the tab if no key is defined. Returns None if an error occurs. the tab if no key is defined. Returns None if an error occurs.
Note that this is exactly the same data that would be returned from a call to Window.Read. Are you sure you Note that this is exactly the same data that would be returned from a call to Window.read. Are you sure you
are using this method correctly? are using this method correctly?
`Get()` `Get()`
|Type|Name|Meaning| |Type|Name|Meaning|
|---|---|---| |---|---|---|
|Any | None| **return** | The key of the currently selected tab or the tab's text if it has no key | |Any | None| **return** | The key of the currently selected tab or None if there is an error |
### SetFocus ### SetFocus
@ -11420,15 +11530,13 @@ Parameter Descriptions:
### get ### get
Dummy function for tkinter port. In the Qt port you can read back the values in the table in case they were Get the selected rows using tktiner's selection method. Returns a list of the selected rows.
edited. Don't know yet how to enable editing of a Tree in tkinter so just returning the values provided by
user when Table was created or Updated.
`get()` `get()`
|Type|Name|Meaning| |Type|Name|Meaning|
|---|---|---| |---|---|---|
|List[List[Any]]| **return** | the current table values (for now what was originally provided up updated) | |List[int]| **return** | a list of the index of the selected rows (a list of ints) |
### get_next_focus ### get_next_focus
@ -11652,15 +11760,13 @@ The following methods are here for backwards compatibility reference. You will
### Get ### Get
Dummy function for tkinter port. In the Qt port you can read back the values in the table in case they were Get the selected rows using tktiner's selection method. Returns a list of the selected rows.
edited. Don't know yet how to enable editing of a Tree in tkinter so just returning the values provided by
user when Table was created or Updated.
`Get()` `Get()`
|Type|Name|Meaning| |Type|Name|Meaning|
|---|---|---| |---|---|---|
|List[List[Any]]| **return** | the current table values (for now what was originally provided up updated) | |List[int]| **return** | a list of the index of the selected rows (a list of ints) |
### SetFocus ### SetFocus
@ -12194,6 +12300,7 @@ Tree(data = None,
show_expanded = False, show_expanded = False,
change_submits = False, change_submits = False,
enable_events = False, enable_events = False,
click_toggles_select = None,
font = None, font = None,
justification = "right", justification = "right",
text_color = None, text_color = None,
@ -12245,6 +12352,7 @@ Parameter Descriptions:
| bool | show_expanded | if True then the tree will be initially shown with all nodes completely expanded | | bool | show_expanded | if True then the tree will be initially shown with all nodes completely expanded |
| bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead | | bool | change_submits | DO NOT USE. Only listed for backwards compat - Use enable_events instead |
| bool | enable_events | Turns on the element specific events. Tree events happen when row is clicked | | bool | enable_events | Turns on the element specific events. Tree events happen when row is clicked |
| bool | click_toggles_select | If True then clicking a row will cause the selection for that row to toggle between selected and deselected |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| str | justification | 'left', 'right', 'center' are valid choices | | str | justification | 'left', 'right', 'center' are valid choices |
| str | text_color | color of the text | | str | text_color | color of the text |
@ -13044,6 +13152,7 @@ Window(title,
sbar_arrow_width = None, sbar_arrow_width = None,
sbar_frame_color = None, sbar_frame_color = None,
sbar_relief = None, sbar_relief = None,
watermark = None,
metadata = None) metadata = None)
``` ```
@ -13111,6 +13220,7 @@ Parameter Descriptions:
| int | sbar_arrow_width | Scrollbar width of the arrow on the scrollbar. It will potentially impact the overall width of the scrollbar | | int | sbar_arrow_width | Scrollbar width of the arrow on the scrollbar. It will potentially impact the overall width of the scrollbar |
| str | sbar_frame_color | Scrollbar Color of frame around scrollbar (available only on some ttk themes) | | str | sbar_frame_color | Scrollbar Color of frame around scrollbar (available only on some ttk themes) |
| str | sbar_relief | Scrollbar relief that will be used for the "thumb" of the scrollbar (the thing you grab that slides). Should be a constant that is defined at starting with "RELIEF_" - RELIEF_RAISED, RELIEF_SUNKEN, RELIEF_FLAT, RELIEF_RIDGE, RELIEF_GROOVE, RELIEF_SOLID | | str | sbar_relief | Scrollbar relief that will be used for the "thumb" of the scrollbar (the thing you grab that slides). Should be a constant that is defined at starting with "RELIEF_" - RELIEF_RAISED, RELIEF_SUNKEN, RELIEF_FLAT, RELIEF_RIDGE, RELIEF_GROOVE, RELIEF_SOLID |
| bool | watermark | If True, then turns on watermarking temporarily for ALL windows created from this point forward. See global settings doc for more info |
| Any | metadata | User metadata that can be set to ANYTHING | | Any | metadata | User metadata that can be set to ANYTHING |
### add_row ### add_row
@ -13615,7 +13725,7 @@ IMPORTANT - This method uses THREADS... this means you CANNOT make any PySimpleG
the function you provide with the exception of one function, Window.write_event_value. the function you provide with the exception of one function, Window.write_event_value.
``` ```
perform_long_operation(func, end_key) perform_long_operation(func, end_key = None)
``` ```
Parameter Descriptions: Parameter Descriptions:
@ -13623,7 +13733,7 @@ Parameter Descriptions:
|Type|Name|Meaning| |Type|Name|Meaning|
|--|--|--| |--|--|--|
| Any | func | A lambda or a function name with no parms | | Any | func | A lambda or a function name with no parms |
| Any | end_key | The key that will be generated when the function returns | | (Any or None) | end_key | Optional key that will be generated when the function returns |
| threading.Thread | **RETURN** | The id of the thread | threading.Thread | **RETURN** | The id of the thread
### read ### read
@ -13837,7 +13947,7 @@ IMPORTANT - This method uses THREADS... this means you CANNOT make any PySimpleG
the function you provide with the exception of one function, Window.write_event_value. the function you provide with the exception of one function, Window.write_event_value.
``` ```
start_thread(func, end_key) start_thread(func, end_key = None)
``` ```
Parameter Descriptions: Parameter Descriptions:
@ -13845,9 +13955,63 @@ Parameter Descriptions:
|Type|Name|Meaning| |Type|Name|Meaning|
|--|--|--| |--|--|--|
| Any | func | A lambda or a function name with no parms | | Any | func | A lambda or a function name with no parms |
| Any | end_key | The key that will be generated when the function returns | | (Any or None) | end_key | Optional key that will be generated when the function returns |
| threading.Thread | **RETURN** | The id of the thread | threading.Thread | **RETURN** | The id of the thread
### timer_get_active_timers
Returns a list of currently active timers for a window
`timer_get_active_timers()`
|Type|Name|Meaning|
|---|---|---|
|List[int]| **return** | List of timers for the window |
### timer_start
Starts a timer that gnerates Timer Events. The default is to repeat the timer events until timer is stopped.
You can provide your own key or a default key will be used. The default key is defined
with the constants EVENT_TIMER or TIMER_KEY. They both equal the same value.
The values dictionary will contain the timer ID that is returned from this function.
```
timer_start(frequency_ms,
key = "__TIMER EVENT__",
repeating = True)
```
Parameter Descriptions:
|Type|Name|Meaning|
|--|--|--|
| int | frequency_ms | How often to generate timer events in milliseconds |
| str or int or tuple or object | key | Key to be returned as the timer event |
| bool | repeating | If True then repeat timer events until timer is explicitly stopped |
| int | **RETURN** | Timer ID for the timer
### timer_stop
Stops a timer with a given ID
```
timer_stop(timer_id)
```
Parameter Descriptions:
|Type|Name|Meaning|
|--|--|--|
| int | timer_id | Timer ID of timer to stop |
### timer_stop_all
Stops all timers for THIS window
```python
timer_stop_all()
```
### un_hide ### un_hide
Used to bring back a window that was previously hidden using the Hide method Used to bring back a window that was previously hidden using the Hide method
@ -14911,7 +15075,7 @@ Parameter Descriptions:
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| bool | focus | if focus should be set to this | | bool | focus | if focus should be set to this |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
@ -14919,6 +15083,7 @@ Parameter Descriptions:
| str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. | | str or int or tuple or object | k | Same as the Key. You can use either k or key. Which ever is set will be used. |
| str | locale | defines the locale used to get day names | | str | locale | defines the locale used to get day names |
| str | format | formats result using this strftime format | | str | format | formats result using this strftime format |
| int | begin_at_sunday_plus | Determines the left-most day in the display. 0=sunday, 1=monday, etc |
| List[str] | month_names | optional list of month names to use (should be 12 items) | | List[str] | month_names | optional list of month names to use (should be 12 items) |
| List[str] | day_abbreviations | optional list of abbreviations to display as the day of week | | List[str] | day_abbreviations | optional list of abbreviations to display as the day of week |
| str | title | Title shown on the date chooser window | | str | title | Title shown on the date chooser window |
@ -14963,7 +15128,7 @@ Parameter Descriptions:
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| str | tooltip | text, that will appear when mouse hovers over the element | | str | tooltip | text, that will appear when mouse hovers over the element |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| | focus | if focus should be set to this | | | focus | if focus should be set to this |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
@ -15021,7 +15186,7 @@ Parameter Descriptions:
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| bool | bind_return_key | If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| bool | focus | Determines if initial focus should go to this element. | | bool | focus | Determines if initial focus should go to this element. |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
@ -15072,7 +15237,7 @@ Parameter Descriptions:
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| str | tooltip | text, that will appear when mouse hovers over the element | | str | tooltip | text, that will appear when mouse hovers over the element |
| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| | focus | if focus should be set to this | | | focus | if focus should be set to this |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
@ -15134,7 +15299,7 @@ Parameter Descriptions:
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| bool | focus | if focus should be set to this | | bool | focus | if focus should be set to this |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
@ -15179,7 +15344,7 @@ Parameter Descriptions:
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| str | tooltip | text, that will appear when mouse hovers over the element | | str | tooltip | text, that will appear when mouse hovers over the element |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| | focus | if focus should be set to this | | | focus | if focus should be set to this |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
@ -15432,7 +15597,7 @@ Parameter Descriptions:
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| str | tooltip | text, that will appear when mouse hovers over the element | | str | tooltip | text, that will appear when mouse hovers over the element |
| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| | focus | if focus should be set to this | | | focus | if focus should be set to this |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
@ -15520,7 +15685,7 @@ Parameter Descriptions:
| bool | auto_size_button | True if button size is determined by button text | | bool | auto_size_button | True if button size is determined by button text |
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| bool | bind_return_key | (Default = True) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = True) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| str | tooltip | text, that will appear when mouse hovers over the element | | str | tooltip | text, that will appear when mouse hovers over the element |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| idk_yetReally | focus | if focus should be set to this | | idk_yetReally | focus | if focus should be set to this |
@ -15565,7 +15730,7 @@ Parameter Descriptions:
| bool | auto_size_button | True if button size is determined by button text | | bool | auto_size_button | True if button size is determined by button text |
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| bool | bind_return_key | (Default = True) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = True) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| str | tooltip | text, that will appear when mouse hovers over the element | | str | tooltip | text, that will appear when mouse hovers over the element |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| idk_yetReally | focus | if focus should be set to this | | idk_yetReally | focus | if focus should be set to this |
@ -15610,7 +15775,7 @@ Parameter Descriptions:
| bool | auto_size_button | True if button size is determined by button text | | bool | auto_size_button | True if button size is determined by button text |
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| bool | bind_return_key | (Default = True) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = True) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| str | tooltip | text, that will appear when mouse hovers over the element | | str | tooltip | text, that will appear when mouse hovers over the element |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| idk_yetReally | focus | if focus should be set to this | | idk_yetReally | focus | if focus should be set to this |
@ -15657,7 +15822,7 @@ Parameter Descriptions:
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| str | tooltip | text, that will appear when mouse hovers over the element | | str | tooltip | text, that will appear when mouse hovers over the element |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| bool | focus | if focus should be set to this | | bool | focus | if focus should be set to this |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
@ -15712,7 +15877,7 @@ Parameter Descriptions:
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| bool | focus | if focus should be set to this | | bool | focus | if focus should be set to this |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
@ -15754,7 +15919,7 @@ Parameter Descriptions:
| (int, int) or (None, None) or int | s | Same as size parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, size will be used | | (int, int) or (None, None) or int | s | Same as size parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, size will be used |
| bool | auto_size_button | True if button size is determined by button text | | bool | auto_size_button | True if button size is determined by button text |
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
| bool | bind_return_key | (Default = True) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = True) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| str | tooltip | text, that will appear when mouse hovers over the element | | str | tooltip | text, that will appear when mouse hovers over the element |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
@ -15852,7 +16017,7 @@ Parameter Descriptions:
| bool | auto_size_button | True if button size is determined by button text | | bool | auto_size_button | True if button size is determined by button text |
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| bool | bind_return_key | (Default = True) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = True) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| str | tooltip | text, that will appear when mouse hovers over the element | | str | tooltip | text, that will appear when mouse hovers over the element |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| idk_yetReally | focus | if focus should be set to this | | idk_yetReally | focus | if focus should be set to this |
@ -15899,7 +16064,7 @@ Parameter Descriptions:
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| str | tooltip | text, that will appear when mouse hovers over the element | | str | tooltip | text, that will appear when mouse hovers over the element |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| bool | bind_return_key | (Default = True) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = True) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| | focus | if focus should be set to this | | | focus | if focus should be set to this |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | p | Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
@ -15956,7 +16121,7 @@ Parameter Descriptions:
| bool | auto_size_button | True if button size is determined by button text | | bool | auto_size_button | True if button size is determined by button text |
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| idk_yetReally | focus | if focus should be set to this | | idk_yetReally | focus | if focus should be set to this |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
@ -16009,7 +16174,7 @@ Parameter Descriptions:
| bool | auto_size_button | True if button size is determined by button text | | bool | auto_size_button | True if button size is determined by button text |
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| idk_yetReally | focus | if focus should be set to this | | idk_yetReally | focus | if focus should be set to this |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
@ -16067,7 +16232,7 @@ Parameter Descriptions:
| bool | auto_size_button | True if button size is determined by button text | | bool | auto_size_button | True if button size is determined by button text |
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| idk_yetReally | focus | if focus should be set to this | | idk_yetReally | focus | if focus should be set to this |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
@ -16124,7 +16289,7 @@ Parameter Descriptions:
| bool | auto_size_button | True if button size is determined by button text | | bool | auto_size_button | True if button size is determined by button text |
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
| (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike | | (str or (str, int[, str]) or None) | font | specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| bool | bind_return_key | (Default = False) If True, then the return key will cause a the Listbox to generate an event | | bool | bind_return_key | (Default = False) If True, this button will appear to be clicked when return key is pressed in other elements such as Input and elements with return key options |
| bool | disabled | set disable state for element (Default = False) | | bool | disabled | set disable state for element (Default = False) |
| idk_yetReally | focus | if focus should be set to this | | idk_yetReally | focus | if focus should be set to this |
| (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) | | (int, int or (int, int),(int,int) or int,(int,int)) or ((int, int),int) or int | pad | Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
@ -16571,11 +16736,11 @@ Parameter Descriptions:
|Type|Name|Meaning| |Type|Name|Meaning|
|--|--|--| |--|--|--|
| str | title | text to display in eleemnt | | str | title | text to display in titlebar of window |
| int | current_value | current value | | int | current_value | current value |
| int | max_value | max value of QuickMeter | | int | max_value | max value of progress meter |
| Any | *args | stuff to output | | Any | *args | stuff to output as text in the window along with the meter |
| str or int or tuple or object | key | Used to differentiate between mutliple meters. Used to cancel meter early. Now optional as there is a default value for single meters | | str or int or tuple or object | key | Used to differentiate between multiple meters. Used to cancel meter early. Now optional as there is a default value for single meters |
| str | orientation | 'horizontal' or 'vertical' ('h' or 'v' work) (Default value = 'vertical' / 'v') | | str | orientation | 'horizontal' or 'vertical' ('h' or 'v' work) (Default value = 'vertical' / 'v') |
| (str, str) or str | bar_color | The 2 colors that make up a progress bar. Either a tuple of 2 strings or a string. Tuple - (bar, background). A string with 1 color changes the background of the bar only. A string with 2 colors separated by "on" like "red on blue" specifies a red bar on a blue background. | | (str, str) or str | bar_color | The 2 colors that make up a progress bar. Either a tuple of 2 strings or a string. Tuple - (bar, background). A string with 1 color changes the background of the bar only. A string with 2 colors separated by "on" like "red on blue" specifies a red bar on a blue background. |
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
@ -16625,11 +16790,11 @@ Parameter Descriptions:
|Type|Name|Meaning| |Type|Name|Meaning|
|--|--|--| |--|--|--|
| str | title | text to display in eleemnt | | str | title | text to display in titlebar of window |
| int | current_value | current value | | int | current_value | current value |
| int | max_value | max value of QuickMeter | | int | max_value | max value of progress meter |
| Any | *args | stuff to output | | Any | *args | stuff to output as text in the window along with the meter |
| str or int or tuple or object | key | Used to differentiate between mutliple meters. Used to cancel meter early. Now optional as there is a default value for single meters | | str or int or tuple or object | key | Used to differentiate between multiple meters. Used to cancel meter early. Now optional as there is a default value for single meters |
| str | orientation | 'horizontal' or 'vertical' ('h' or 'v' work) (Default value = 'vertical' / 'v') | | str | orientation | 'horizontal' or 'vertical' ('h' or 'v' work) (Default value = 'vertical' / 'v') |
| (str, str) or str | bar_color | The 2 colors that make up a progress bar. Either a tuple of 2 strings or a string. Tuple - (bar, background). A string with 1 color changes the background of the bar only. A string with 2 colors separated by "on" like "red on blue" specifies a red bar on a blue background. | | (str, str) or str | bar_color | The 2 colors that make up a progress bar. Either a tuple of 2 strings or a string. Tuple - (bar, background). A string with 1 color changes the background of the bar only. A string with 2 colors separated by "on" like "red on blue" specifies a red bar on a blue background. |
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
@ -16738,7 +16903,8 @@ popup_animated(image_source,
time_between_frames = 0, time_between_frames = 0,
transparent_color = None, transparent_color = None,
title = "", title = "",
icon = None) icon = None,
no_buffering = False)
``` ```
Parameter Descriptions: Parameter Descriptions:
@ -16760,6 +16926,7 @@ Parameter Descriptions:
| str | transparent_color | This color will be completely see-through in your window. Can even click through | | str | transparent_color | This color will be completely see-through in your window. Can even click through |
| str | title | Title that will be shown on the window | | str | title | Title that will be shown on the window |
| str or bytes | icon | Same as Window icon parameter. Can be either a filename or Base64 byte string. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO | | str or bytes | icon | Same as Window icon parameter. Can be either a filename or Base64 byte string. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO |
| bool | no_buffering | If True then no buffering will be used for the GIF. May work better if you have a large animation |
| bool | **RETURN** | True if the window updated OK. False if the window was closed | bool | **RETURN** | True if the window updated OK. False if the window was closed
Popup that closes itself after some time period Popup that closes itself after some time period
@ -16942,6 +17109,9 @@ popup_get_date(start_mon = None,
locale = None, locale = None,
month_names = None, month_names = None,
day_abbreviations = None, day_abbreviations = None,
day_font = "TkFixedFont 9",
mon_year_font = "TkFixedFont 10",
arrow_font = "TkFixedFont 7",
modal = True) modal = True)
``` ```
@ -16963,6 +17133,9 @@ Parameter Descriptions:
| bool | keep_on_top | If True the window will remain above all current windows | | bool | keep_on_top | If True the window will remain above all current windows |
| List[str] | month_names | optional list of month names to use (should be 12 items) | | List[str] | month_names | optional list of month names to use (should be 12 items) |
| List[str] | day_abbreviations | optional list of abbreviations to display as the day of week | | List[str] | day_abbreviations | optional list of abbreviations to display as the day of week |
| str or tuple | day_font | Font and size to use for the calendar |
| str or tuple | mon_year_font | Font and size to use for the month and year at the top |
| str or tuple | arrow_font | Font and size to use for the arrow buttons |
| bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True | | bool | modal | If True then makes the popup will behave like a Modal window... all other windows are non-operational until this one is closed. Default = True |
| None or (int, int, int) | **RETURN** | Tuple containing (month, day, year) of chosen date or None if was cancelled | None or (int, int, int) | **RETURN** | Tuple containing (month, day, year) of chosen date or None if was cancelled
@ -17816,7 +17989,8 @@ PopupAnimated(image_source,
time_between_frames = 0, time_between_frames = 0,
transparent_color = None, transparent_color = None,
title = "", title = "",
icon = None) icon = None,
no_buffering = False)
``` ```
Parameter Descriptions: Parameter Descriptions:
@ -17838,6 +18012,7 @@ Parameter Descriptions:
| str | transparent_color | This color will be completely see-through in your window. Can even click through | | str | transparent_color | This color will be completely see-through in your window. Can even click through |
| str | title | Title that will be shown on the window | | str | title | Title that will be shown on the window |
| str or bytes | icon | Same as Window icon parameter. Can be either a filename or Base64 byte string. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO | | str or bytes | icon | Same as Window icon parameter. Can be either a filename or Base64 byte string. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO |
| bool | no_buffering | If True then no buffering will be used for the GIF. May work better if you have a large animation |
| bool | **RETURN** | True if the window updated OK. False if the window was closed | bool | **RETURN** | True if the window updated OK. False if the window was closed
Display a Popup without a titlebar. Enables grab anywhere so you can move it Display a Popup without a titlebar. Enables grab anywhere so you can move it
@ -19704,7 +19879,7 @@ Parameter Descriptions:
|Type|Name|Meaning| |Type|Name|Meaning|
|--|--|--| |--|--|--|
| str | command | Filename to load settings from (and save to in the future) | | str | command | The command/file to execute. What you would type at a console to run a program or shell command. |
| Any | *args | Variable number of arguments that are passed to the program being started as command line parms | | Any | *args | Variable number of arguments that are passed to the program being started as command line parms |
| bool | wait | If True then wait for the subprocess to finish | | bool | wait | If True then wait for the subprocess to finish |
| str | cwd | Working directory to use when executing the subprocess | | str | cwd | Working directory to use when executing the subprocess |
@ -19960,7 +20135,8 @@ set_options(icon = None,
sbar_relief = None, sbar_relief = None,
alpha_channel = None, alpha_channel = None,
hide_window_when_creating = None, hide_window_when_creating = None,
use_button_shortcuts = None) use_button_shortcuts = None,
watermark_text = None)
``` ```
Parameter Descriptions: Parameter Descriptions:
@ -20033,6 +20209,7 @@ Parameter Descriptions:
| float | alpha_channel | Default alpha channel to be used on all windows | | float | alpha_channel | Default alpha channel to be used on all windows |
| bool | hide_window_when_creating | If True then alpha will be set to 0 while a window is made and moved to location indicated | | bool | hide_window_when_creating | If True then alpha will be set to 0 while a window is made and moved to location indicated |
| bool | use_button_shortcuts | If True then Shortcut Char will be used with Buttons | | bool | use_button_shortcuts | If True then Shortcut Char will be used with Buttons |
| str | watermark_text | Set the text that will be used if a window is watermarked |
| None | **RETURN** | None | None | **RETURN** | None
### Non PEP8 versions ### Non PEP8 versions
@ -20116,7 +20293,8 @@ SetOptions(icon = None,
sbar_relief = None, sbar_relief = None,
alpha_channel = None, alpha_channel = None,
hide_window_when_creating = None, hide_window_when_creating = None,
use_button_shortcuts = None) use_button_shortcuts = None,
watermark_text = None)
``` ```
Parameter Descriptions: Parameter Descriptions:
@ -20189,6 +20367,7 @@ Parameter Descriptions:
| float | alpha_channel | Default alpha channel to be used on all windows | | float | alpha_channel | Default alpha channel to be used on all windows |
| bool | hide_window_when_creating | If True then alpha will be set to 0 while a window is made and moved to location indicated | | bool | hide_window_when_creating | If True then alpha will be set to 0 while a window is made and moved to location indicated |
| bool | use_button_shortcuts | If True then Shortcut Char will be used with Buttons | | bool | use_button_shortcuts | If True then Shortcut Char will be used with Buttons |
| str | watermark_text | Set the text that will be used if a window is watermarked |
| None | **RETURN** | None | None | **RETURN** | None
## Old Themes (Look and Feel) - Replaced by theme() ## Old Themes (Look and Feel) - Replaced by theme()

View file

@ -1,7 +1,7 @@
<div style="display: flex; gap: 50px; justify-content: center;"> <div style="display: flex; gap: 50px; justify-content: center;">
<div> <div>
<img src="https://raw.githubusercontent.com/PySimpleGUI/PySimpleGUI/master/images/for_readme/Logo%20with%20text%20for%20GitHub%20Top.png" alt="Python GUIs for Humans"> <img src="https://raw.githubusercontent.com/PySimpleGUI/PySimpleGUI/master/images/for_readme/Logo%20with%20text%20for%20GitHub%20Top.png" alt="User Interfaces for Humans">
<h1 style="text-align: center;">Python GUIs for Humans</h1> <h1 style="text-align: center;">User Interfaces for Humans<sup>TM</sup></h1>
</div> </div>
<div> <div>
<div> <div>
@ -25,9 +25,9 @@
<span style="font-weight: normal;"> <span style="font-weight: normal;">
apply coupon for discount: apply coupon for discount:
</span> </span>
266B9C51C90B3728782E 522B20BF5EF123C4AB30
</div> </div>
<button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=266B9C51C90B3728782E','_blank');"> <button style="margin: 0 auto; display: block; width: 200px; height: 70px; border-radius: 14px; border: none; padding: 10px; font-size: 18px; background-color: #357296; color: white; cursor: pointer;" onclick="window.open('https://www.udemy.com/course/pysimplegui/?couponCode=522B20BF5EF123C4AB30','_blank');">
click here to visit course page click here to visit course page
</button> </button>
</div> </div>
@ -57,7 +57,7 @@
# PySimpleGUI User's Manual # PySimpleGUI User's Manual
## Python GUI For Humans - Transforms tkinter, Qt, Remi, WxPython into portable people-friendly Pythonic interfaces ## User Interfaces for Humans - Transforms tkinter, Qt, Remi, WxPython into portable people-friendly Pythonic interfaces
## <span>The Call Reference Section Moved to <a href="https://pysimplegui.readthedocs.io/en/latest/call%20reference/">here</a></span> ## <span>The Call Reference Section Moved to <a href="https://pysimplegui.readthedocs.io/en/latest/call%20reference/">here</a></span>
@ -2028,7 +2028,8 @@ popup_animated(image_source,
time_between_frames = 0, time_between_frames = 0,
transparent_color = None, transparent_color = None,
title = "", title = "",
icon = None) icon = None,
no_buffering = False)
``` ```
Parameter Descriptions: Parameter Descriptions:
@ -2050,6 +2051,7 @@ Parameter Descriptions:
| str | transparent_color | This color will be completely see-through in your window. Can even click through | | str | transparent_color | This color will be completely see-through in your window. Can even click through |
| str | title | Title that will be shown on the window | | str | title | Title that will be shown on the window |
| str or bytes | icon | Same as Window icon parameter. Can be either a filename or Base64 byte string. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO | | str or bytes | icon | Same as Window icon parameter. Can be either a filename or Base64 byte string. For Windows if filename, it MUST be ICO format. For Linux, must NOT be ICO |
| bool | no_buffering | If True then no buffering will be used for the GIF. May work better if you have a large animation |
| bool | **RETURN** | True if the window updated OK. False if the window was closed | bool | **RETURN** | True if the window updated OK. False if the window was closed
***To close animated popups***, call PopupAnimated with `image_source=None`. This will close all of the currently open PopupAnimated windows. ***To close animated popups***, call PopupAnimated with `image_source=None`. This will close all of the currently open PopupAnimated windows.
@ -2078,11 +2080,11 @@ Parameter Descriptions:
|Type|Name|Meaning| |Type|Name|Meaning|
|--|--|--| |--|--|--|
| str | title | text to display in eleemnt | | str | title | text to display in titlebar of window |
| int | current_value | current value | | int | current_value | current value |
| int | max_value | max value of QuickMeter | | int | max_value | max value of progress meter |
| Any | *args | stuff to output | | Any | *args | stuff to output as text in the window along with the meter |
| str or int or tuple or object | key | Used to differentiate between mutliple meters. Used to cancel meter early. Now optional as there is a default value for single meters | | str or int or tuple or object | key | Used to differentiate between multiple meters. Used to cancel meter early. Now optional as there is a default value for single meters |
| str | orientation | 'horizontal' or 'vertical' ('h' or 'v' work) (Default value = 'vertical' / 'v') | | str | orientation | 'horizontal' or 'vertical' ('h' or 'v' work) (Default value = 'vertical' / 'v') |
| (str, str) or str | bar_color | The 2 colors that make up a progress bar. Either a tuple of 2 strings or a string. Tuple - (bar, background). A string with 1 color changes the background of the bar only. A string with 2 colors separated by "on" like "red on blue" specifies a red bar on a blue background. | | (str, str) or str | bar_color | The 2 colors that make up a progress bar. Either a tuple of 2 strings or a string. Tuple - (bar, background). A string with 1 color changes the background of the bar only. A string with 2 colors separated by "on" like "red on blue" specifies a red bar on a blue background. |
| (str, str) or str | button_color | button color (foreground, background) | | (str, str) or str | button_color | button color (foreground, background) |
@ -7112,12 +7114,54 @@ There are a number of demo programs that show how to use UserSettings to create
If you're using the default path, remember that previous runs of your file may have old settings that are still in your settings file. It can get confusing when you've forgotten that you previously wrote a setting. Not seeing the filename can have drawbacks like this. If you're using the default path, remember that previous runs of your file may have old settings that are still in your settings file. It can get confusing when you've forgotten that you previously wrote a setting. Not seeing the filename can have drawbacks like this.
Also, because the settings automatically save after every update, it can be easy to accidently overwrite a previously saved setting. If you want to avoid this, then perhaps it's best that you work with a dictionary within your code and then explicitly save your dictionary when you're ready to commit it to disk. Also, because the settings automatically save after every update, it can be easy to accidentally overwrite a previously saved setting. If you want to avoid this, then perhaps it's best that you work with a dictionary within your code and then explicitly save your dictionary when you're ready to commit it to disk.
To save your Python dictionary to a settings file, simply call `user_settings_write_new_dictionary(dict)`, passing in your dictionary as the parameter. To save your Python dictionary to a settings file, simply call `user_settings_write_new_dictionary(dict)`, passing in your dictionary as the parameter.
------------------------- -------------------------
# Timer API
The Timer API calls are in version 4.61.0 that is currently only available on the PySimpleGUI GitHub. It has not been released to PyPI yet.
## Do Not Use Sleeps In Your Event Loop...
Instead of sleeping, you can request that an event be generated after some period of time. If you need to "Sleep for 3 seconds" as part of some operation, instead schedule a timer for 3 seconds. Your `window.read` call will return a value of `sg.TIMER_KEY` or `sg.EVENT_TIMER` (they are aliases and thus have the same value).
## Timer API Calls
These are the API calls that you'll use to manage timers:
`window.timer_start` starts a timer
`window.timer_stop` stops a single timer
`window.timer_stop_all` stops all timers
`window.timer_get_active_timers` returns a list of active timer IDs
Example - start a 3 second timer that does not repeat:
```python
window.timer_start(3000, repeating=False) # start a 3-second timer
```
When this timer expires, you'll get an event `sg.EVENT_TIMER`. If you want to specify your own key to be returned, then use the `key` parameter:
```python
window.timer_start(3000, key='-MY TIMER KEY-', repeating=False)
```
See the call reference for the details of each call.
## Timer Demo Programs
Using the PySimpleGUI Demo Browser, search for `window.timer_` to find Demo Programs that use the Timer API calls.
The program `Demo_WindowTimer.py` demonstrates both repeating and non-repeating timers as well as using custom keys. It's a simple set of API calls to use and the docstrings in combination with the Demo Programs should give you all you need to start using this capability.
---------------------------
# Extending PySimpleGUI # Extending PySimpleGUI
PySimpleGUI doesn't and can't provide every single setting available in the underlying GUI framework. Not all tkinter options are available for a `Text` Element. Same with PySimpleGUIQt and the other ports. PySimpleGUI doesn't and can't provide every single setting available in the underlying GUI framework. Not all tkinter options are available for a `Text` Element. Same with PySimpleGUIQt and the other ports.
@ -10092,6 +10136,22 @@ Test Harness and Settings Windows fit on small screens better
* Emergency Patch Release for Mac OS 12.3 and greater * Emergency Patch Release for Mac OS 12.3 and greater
* Fixed bug in Mac OS version check in yesterday's 4.60.2 release * Fixed bug in Mac OS version check in yesterday's 4.60.2 release
## 4.60.4 PySimpleGUI 10-Oct-2022
* Dot release to quickly fix the Trinket detection which stopped working recently
## 4.60.5 PySimpleGUI 21-May-2023
* Mac fixes
* Fix for Input Element not working in no-titlebar windows on MacOs 13.2.1
* Change to the 0.99 Alpha fix made in 4.60.2. Now only applies patch when running on 8.6.12, regardless of Mac Control Panel setting in PySimpleGUI Global Settings. Removes the need for users to disable when upgrading tkinter.
* Added Intelligent Upgrade Service - inform users when there are releases of PySimpleGUI that fix a problem that may be unique to their combination of components
* Change to GitHub Issue GUI
* Added checkbox for checking if running latest PyPI version
* Recommended using Demo Browser to search Demo Programs
* Use platform module to fill in the OS information field
* SDK Help Window - changed all readthedocs links to use the PySimpleGUI.org hostname for better portability
## Code Condition ## Code Condition
Make it run Make it run

View file

@ -1,7 +1,12 @@
version: 2 version: 2
version: 2
build:
os: "ubuntu-22.04"
tools:
python: "3.11"
python: python:
version: 3.6
install: install:
- requirements: docs/requirements.txt - requirements: docs/requirements.txt