summaryrefslogtreecommitdiff
path: root/python-pysimpleguiwx.spec
blob: 98584769d52ec8acd05694a546ed239ff1ba2379 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
1136
1137
1138
1139
1140
1141
1142
1143
1144
1145
1146
1147
1148
1149
1150
1151
1152
1153
1154
1155
1156
1157
1158
1159
1160
1161
1162
1163
1164
1165
1166
1167
1168
1169
1170
1171
1172
1173
1174
1175
1176
1177
1178
1179
1180
1181
1182
1183
1184
1185
1186
1187
1188
1189
1190
1191
1192
1193
1194
1195
1196
1197
1198
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
1212
1213
1214
1215
1216
1217
1218
1219
1220
1221
1222
1223
1224
1225
1226
1227
1228
1229
1230
1231
1232
1233
1234
1235
1236
1237
1238
1239
1240
1241
1242
1243
1244
1245
1246
1247
1248
1249
1250
1251
1252
1253
1254
1255
1256
1257
1258
1259
1260
1261
1262
1263
1264
1265
1266
1267
1268
1269
1270
1271
1272
1273
1274
1275
1276
1277
1278
1279
1280
1281
1282
1283
1284
1285
1286
1287
1288
1289
1290
1291
1292
1293
1294
1295
1296
1297
1298
1299
1300
1301
1302
1303
1304
1305
1306
1307
1308
1309
1310
1311
1312
1313
1314
1315
1316
1317
1318
1319
1320
1321
1322
1323
1324
1325
1326
1327
1328
1329
1330
1331
1332
1333
1334
1335
1336
1337
1338
1339
1340
1341
1342
1343
1344
1345
1346
1347
1348
1349
1350
1351
1352
1353
1354
1355
1356
1357
1358
1359
1360
1361
1362
1363
1364
1365
1366
1367
1368
1369
1370
1371
1372
1373
1374
1375
1376
1377
1378
1379
1380
1381
1382
1383
1384
1385
1386
1387
1388
1389
1390
1391
1392
1393
1394
1395
1396
1397
1398
1399
1400
1401
1402
1403
1404
1405
1406
1407
1408
1409
1410
1411
1412
1413
1414
1415
1416
1417
1418
1419
1420
1421
1422
1423
1424
1425
1426
1427
1428
1429
1430
1431
1432
1433
1434
1435
1436
1437
1438
1439
1440
1441
1442
1443
1444
1445
1446
1447
1448
1449
1450
1451
1452
1453
%global _empty_manifest_terminate_build 0
Name:		python-PySimpleGUIWx
Version:	0.17.2
Release:	1
Summary:	The Engineering Pre-Release WxPython version of PySimpleGUI. PySimpleGUI SDK Launched in 2018 Actively developed and supported. Super-simple to create custom GUI's.  Now supports tkinter, Qt, WxPython, and Remi
License:	GNU Lesser General Public License v3 or later (LGPLv3+)
URL:		https://github.com/PySimpleGUI/PySimpleGUI
Source0:	https://mirrors.nju.edu.cn/pypi/web/packages/ff/f2/acc5aa024c99bbcc3dab3b3944427fda9ade1db8ede90aa94b9070423185/PySimpleGUIWx-0.17.2.tar.gz
BuildArch:	noarch

Requires:	python3-WxPython

%description

![pysimplegui_logo](https://user-images.githubusercontent.com/13696193/43165867-fe02e3b2-8f62-11e8-9fd0-cc7c86b11772.png)        

![Downloads](http://pepy.tech/badge/pysimpleguiwx)

 ![Awesome Meter](https://img.shields.io/badge/Awesome_meter-1000-yellow.svg)  

 ![Python Version](https://img.shields.io/badge/Python-3.x-yellow.svg)        


[![PyPI Version](https://img.shields.io/pypi/v/pysimpleguiwx.svg?style=for-the-badge)](https://pypi.org/project/pysimpleguiwx/)         


# PySimpleGUIWx        

The WxPython port of PySimpleGUI

## Primary PySimpleGUI Documentation

To get instructions on how use PySimpleGUI's APIs, please reference the [main documentation](http://www.PySimpleGUI.org). 
This Readme is for information ***specific to*** the WxPython port of PySimpleGUI.


## Why Use PySimpleGUIWx Over The Other Ports?

PySimpleGUIWx brings the number of PySimpleGUI ports to 3.

Why use PySimpleGUIWx over PySimpleGUIQt PySimpleGUI (tkinter version)?  

There are a couple of easy reasons to use PySimpleGUIWx over PySimpleGUIQt. One is footprint.  PyInstaller EXE for PySimpleGUIWx is 9 MB, on Qt it's 240 MB.  Another is cool widgets.  

WxPython has some nice advanced widgets that will be offered though PySimpleGUIWx, hopefully sooner than later.

The System Tray feature works well with a feature set identical to PySimpleGUIQt.  If you are looking for a System Tray feature, PySimpleGUIWx is recommended over PySimpleGUIQt ; the primary reason being size of the WxPython framework versus the size of Qt.  They both give you very similar features.  They look and behave in an ***identical*** fashion when using PySimpleGUI.  That's the beauty of the PSG SDK, the function calls are the same for all implementations of PySimpleGUI.  The source code is highly portable between the GUI frameworks.

This simple list is another way of looking at the question....

1.  It's simple and easy to program GUIs
2.  You can move between the GUI frameworks tkinter, Qt and WxPython by changing a single line of code, the import statement.
3.  Get the same custom layout and access to the same widgets but in a simple, easy to use and understand interface.
4.  It's fun to program GUIs again


 ## Engineering Pre-Release   Version 0.13.0

 [Announcements of Latest Developments](https://github.com/MikeTheWatchGuy/PySimpleGUI/issues/142)        

Having trouble? Visit the [GitHub site ](http://www.PySimpleGUI.com) and log an Issue.


## What Works

Remember, these are Engineering Releases.  Not all features are complete, but generally speaking those that are marked as completed and working are working quite well.  It's not an "Engineering Quality".  The completed features are at about a Beta level.

### Ready to use

#### Elements

* Text
* Input Text
* Buttons including file/folder browse
* Input multiline
* Output multiline
* Output
* Columns
* Frames - except cannot set colors yet
* Progress Meters
* Checkbox
* Radio Button
* Combobox
* Spinner
* Vertical and Horizontal Separators


#### Features

* System Tray
* Debug Print
* Invisible/Visible Elements
* All Popups
* Check box
* Keyboard key events
* Mouse wheel events
* Multiple windows
* Read with timeout
* Background images
* One Line Progress Meter (tm)
* Auto-closing windows
* No titlebar windows
* Grab anywhere windows
* Alpha channel
* Window size
* Window disappear/reappear
* Get screen size
* Get window location
* Change window size
* Window move
* Window minimize
* Window maximize
* Window Disable
* Window Enable
* Window Hide
* Window UnHide
* Window Bring to front
* Look and Feel settings
* Default Icon
* Base64 Icons
* PEP8 bindings for all element methods and functions


It won't take long to poke at these and hit errors.  For example, the code to do Button Updates is not complete.  Most of the time you won't be doing this. 

Due to the small size of the development team, features may feel a little "thin" for a while.  The idea is to implement with enough depth that 80% of the uses are covered.  It's a multi-pass, iterative approach.  

If you, the reader, are having problems or have hit a spot where something is not yet implemented, then open an Issue.  They are often completed in a day.  This process of users pushing the boundaries is what drives the priorities for development.  It's "real world" kinds of problems that have made PySimpleGUI what it is today.



## SystemTray

This was the first fully functioning feature of PySimpleGUIWx.  Previously only the Qt port supported the System Tray.  Why use Wx?  The footprint is much much smaller.  An EXE file created using PyInstaller is 9 MB for PySimpleGUIWx, when using Qt it's 240 MB.

Now it's possible to "tack on" the System Tray to your PySimpleGUI application. 

If you're unable to upgrade to Qt but want the System Tray feature, then adding PySimpleGUIWx to your project may be the way to go.  

You can mix your System Tray's event loop with your normal Window event loop by adding a timeout to both your Window.Read call and your SystemTray.Read call.

### Source code compatibility

PySimpleGUIWx's System Tray feature has been tested against the same PySimpleGUIQt feature.  As long as you don't use features that are not yet supported you'll find your source code will run on either PySimpleGUIQt or PySimpleGUIWx by changing the import statement.  


## System Tray Design Pattern

Here is a design pattern you can use to get a jump-start.

This program will create a system tray icon and perform a blocking Read. 

```python
import PySimpleGUIWx as sg

tray = sg.SystemTray(menu= ['menu',['Open', ['&Save::KEY', '---', 'Issues', '!Disabled'], 'E&xit']],
                     filename=r'C:\Python\PycharmProjects\PSG\default_icon.ico')
tray.ShowMessage('My Message', 'The tray icon is up and runnning!')
while True:
    event = tray.Read()
    print(event)
    if event == 'Exit':
        break
```


## Menu Definitions

See the original, full documentation for PySimpleGUI to get an understanding of how menus are defined.  


## SystemTray Methods

### Read - Read the context menu or check for events

```python
def Read(timeout=None)
    '''  
 Reads the context menu  
 :param timeout: Optional.  Any value other than None indicates a non-blocking read
 :return:   String representing meny item chosen. None if nothing read.  
    '''
```
The `timeout` parameter specifies how long to wait for an event to take place.  If nothing happens within the timeout period, then a "timeout event" is returned.  These types of reads make it possible to run asynchronously.  To run non-blocked, specify `timeout=0`on the Read call (not yet supported).

Read returns the menu text, complete with key, for the menu item chosen.  If you specified `Open::key` as the menu entry, and the user clicked on `Open`, then you will receive the string `Open::key` upon completion of the Read.

#### Read special return values

In addition to Menu Items, the Read call can return several special values.    They include:

EVENT_SYSTEM_TRAY_ICON_DOUBLE_CLICKED - Tray icon was double clicked
EVENT_SYSTEM_TRAY_ICON_ACTIVATED - Tray icon was single clicked
EVENT_SYSTEM_TRAY_MESSAGE_CLICKED - a message balloon was clicked
TIMEOUT_KEY is returned if no events are available if the timeout value is set in the Read call


### ShowMessage

Just like Qt, you can create a pop-up message.  Unlike Qt, you cannot set your own custom icon in the message, at least you can't at the moment.

The preset `messageicon` values are:

    SYSTEM_TRAY_MESSAGE_ICON_INFORMATION 
    SYSTEM_TRAY_MESSAGE_ICON_WARNING
    SYSTEM_TRAY_MESSAGE_ICON_CRITICAL 
    SYSTEM_TRAY_MESSAGE_ICON_NOICON

```python
ShowMessage(title, message, filename=None, data=None, data_base64=None, messageicon=None, time=10000):  
    '''  
 Shows a balloon above icon in system tray  
 :param title:  Title shown in balloon  
 :param message: Message to be displayed  
 :param filename: Optional icon filename  
 :param data: Optional in-ram icon  
 :param data_base64: Optional base64 icon  
 :param time: How long to display message in milliseconds  :return:  
 '''
```

### Update

You can update any of these items within a SystemTray object
* Menu definition
* Icon (not working yet)
* Tooltip

 Change them all or just 1.

```python
Update(menu=None, tooltip=None,filename=None, data=None, data_base64=None,)
    '''  
 Updates the menu, tooltip or icon  
 :param menu: menu defintion  
 :param tooltip: string representing tooltip  
 :param filename:  icon filename  
 :param data:  icon raw image  
 :param data_base64: icon base 64 image  
 :return:  
 '''
```
## Menus with Keys

You can add a key to your menu items.  To do so, you add :: and the key value to the end of your menu definition. 

`menu_def = ['File', ['Hide::key', '&Open::key', '&Save',['1', '2', ['a','b']], '&Properties', 'E&xit']]`

The menu definition adds a key "key" to the menu entries Hide and Open.

If you want to change the separator characters from :: top something else,change the variable `MENU_KEY_SEPARATOR`

When a menu item has a key and it is chosen, then entire string is returned.  If Hide were selected, then Hide::key would be returned from the Read.  Note that the shortcut character & is NOT returned from Reads.


## Popups

Starting with release 0.4.0, most of the Popup functions work.  This means you can do things like show information in a window when there's a choice made in a System Tray menu.  Or if your program finds some event it wishes to inform the user about.  For example, when new Issues are posted on a GitHub project.


# Release Notes:  

### 0.1.0   -   25-Dec-2018

* Support for SystemTray
  * Read, with or without a timeout
  * Catch single click, double click events
  * Source code compatiable with Qt

### 0.2.0   -   26-Dec-2018

* Correctly handling base64 images
* Support for clicking message balloon
* Can Hide and  UnHide the  icon


### 0.3.0   -   27-Dec-2018

* Hooked up buttons!
* Browse file button is only file/folder button that works
* Text, Input and Button elements are the only working elements
* SystemTray can take any kind of image as icon
* Read with Timeout (non-zero) works
* Popups


### 0.4.0 PySimpleGUIWx  30-Dec-2018

* Text Element - colors, font work
* Text Update method works
* Button - Close button implemented
* Button - Implemented basic button, correctly presented Values on Read
* Button - Can now set font
* Changed overall "App" variable usage for better mainloop control
* Windows - Timeouts and non-blocking Reads work
* Windows - Autoclose works
* Windows - Non-blocking calls supported (timeout=0)
* Windows - Grab anywhere works
* Windows - No title-bar works
* Windows - Location and Size working correctly
* Correctly adding element padding to Text, Input, Buttons
* Popups - most Popups work (except for the input type that involve folders)

### 0.5.0 PySimpleGUIWx 6-Jan-2019

* New element - Multiline input
* New element - Multiline output
* Borderless Windows
* Grab anywhere windows
* Alpha channel for windows
* Finishing up the Text and Input Text Elements
* Visibility for all Elements
* Input Get / Set focus
* Output element - unable to get stdout to re-route
* Debug window works


### 0.6.0 9-Jan-2019

* Column Element
* Checkbox Element with events
* Output Element
* Background Image (I think works)
* Debug Print
* One Line Progress Meter
* All Popups works

### 0.7.0 PySimpleGUIWx 21-Jan-2019

* Element.Update support for disabled and tooltip
* Combo Element
* Newest Combo parameters
* Radio Element
* Newest Radio parameters (size_px, visible, enable_events)
* Type hints on Wx widgets
* Spinner Element
* Newest Spinner parameters
* Text Element visibility
* Column Element size_px parameter (unclear if works... likely does not)
* Column visibility
* Column Update method added
* System Tray - support for any kind of image format for icons
* Window.Move
* Window.Minimize
* Window.Maximize
* Window.Disable
* Window.Enable
* Window.Hide
* Window.UnHide
* Window.BringToFront
* Popup non_blocking - returns window and button not just button
* More comprehensive test harness when running PySimpleGUIWx.py

### 0.8.0 20-Feb-2019 PySimpleGUIWx

* Big Try/Except block around Update method for multiline in case window closed
* Text - convert incoming text to string right away
* Text.Update - convert incoming value to string
* Completed Button.Update method.  Can now change text, color, etc.
* Added Try around reading multiline input value - not sure why needed
* OneLineProgressMeter - can update text on every call now

### 0.9.0 06-Mar-2019 PySimpleGUIWx

* Addition of Assert Suppression
   * This was needed for a  multi-threaded version of PySimpleGUIWx
   * Complained when exiting a system tray if did not make this change and ran the tray in a thread
* Tray.Close now correctly Hides the icon
* SetGlobalIcon functional
* Can also now set icon using SetOptions call


### 0.10.0 23-Mar-2019 PySimpleGUIWx

* `do_not_clear` is now TRUE by default on Input and Multiline elements!!


## 0.11.0 11-Apr-2019 PySimpleGUIWx

* NEW Window parameter layout so can skip calling Layout

## 0.13.0 1-OCT-2019 PySimpleGUIWx

* Version numbering using sg.version string
* PEP8 bindings!
* Improved scaling of character to pixel sizes of elements that are multilined
* Added Metadata variable to all elements
* Renamed element callback functions to start with _
* Removed __del__ methods everywhere except Output Element
* Can "Call" an element which will call its Update method
* InputText element - convert default text and password char to string 
* Removed old code such as tkinter's tooltip and drag and drop from Qt
* Shortcut I for InputText
* Listbox added size_px parm
* Changed type checking to use the comment style types
* Added Element.Widget to all Elements so can access the Wx widgets directly
* Text Element now defaults to '' so no need to specify anything if a blank Text Element (often used for output)
* Button text converted to string when creating button
* New Button shortcuts - B, Btn
* VerticalSeparator - Newly supported Element
* HorizontalSeparator - Newly supported Element
* Slider - added size_px parm
* Fixed leak caused by System Tray not cleaning up the timer
* Window - added finalize paramter so can skip using chained .Finalize()
* Window - AllKeysDict now used like other PySimpleGUI ports. Has all the keys and elements in a window
* Window.FindElement - added silent_on_error parm like other ports have
* Window[key] construct added that calls FindElement
* window() - can "Call" a window you've created. Will call Window.Read()
* Popup buttons no longer use CloseButtons for normal popups.  Calls window.Close manually
* PopupGetFolder changed to use keys, normal button, new window design patterns
* PopupGetFile changed to use keys, normal buttons, new window design patterns
* PopupGetText changed to use keys, normal buttons, new window design patterns
* Default application (PySimpleGUI.main) now shows the version number like other PySimpleGUI ports

## 0.13.0 17-Nov-2019 PySimpleGUIWx

* 105 Look and Feel Themes to choose from!
* New "Fuzzy" look and feel selection
* Preview all look and feels not yet supported due to lack of Frame support

## 0.15.0 PySimpleGUIWx 24-Dec-2019

Themes!

* Picked up the new "theme" APIs like all 4 ports got
* Dark Blue 3 is the new official color theme for PySimpleGUI
* Added "port" string so that your code can detect which port of PySimpleGUI is being executed
* Removed restriction on Macs (totally didn't make sense that it was there as it blocked a tkinter problem, not a Wx one)
* Depricated the TRANSPARENT_BUTTON variable as it was being misunderstood by users and was misleading
* BROWSE_FILES_DELIMITER can be changed to change the default ';' delimeter between filenames in FilesBrowse button
* Frame Element!  BUT, it's only a partial solution as I am unable to set the background color (need to understand how panels work). It's better than nothing


## 0.16.0 PySimpleGUIWx 6-May-2020

* Added constants
    * WIN_CLOSED and WINDOW_CLOSED
    * EVENT_TIMEOUT and TIMEOUT_EVENT
* Added Graph.change_coordinates method
* Added close parameter to Window.read


## 0.17.0 PySimpleGUIWx 6-Jun-2020

Element justification within Window and Containers!  Finally a unified justification

* When any Radio element is updated to be False, the entire GROUP is reset so nothing is selected
* element_jutification added so that all elements inside these will be justified accordingly.
	* For PySimpleGUIQt only, the default is "float" which sets nothing. Buttons will stretch across the window as result
	* Valid values are 'l', 'r', 'c'.  You can spell it out, but only first letter is used.
	* Window
	* Frame
	* Column
	* Tab

## 0.17.1 PySimpleGUIWx 7-Jun-2020

* Quick patch of Multiline.update so that newlines are recognized correctly


# Design        
# Author 
 Mike B.        


# License        
 GNU Lesser General Public License (LGPL 3) +        

# Acknowledgments
<!--stackedit_data:
eyJoaXN0b3J5IjpbLTIxNDIwNTI0ODQsODg2MzA1Mjk2XX0=
-->



%package -n python3-PySimpleGUIWx
Summary:	The Engineering Pre-Release WxPython version of PySimpleGUI. PySimpleGUI SDK Launched in 2018 Actively developed and supported. Super-simple to create custom GUI's.  Now supports tkinter, Qt, WxPython, and Remi
Provides:	python-PySimpleGUIWx
BuildRequires:	python3-devel
BuildRequires:	python3-setuptools
BuildRequires:	python3-pip
%description -n python3-PySimpleGUIWx

![pysimplegui_logo](https://user-images.githubusercontent.com/13696193/43165867-fe02e3b2-8f62-11e8-9fd0-cc7c86b11772.png)        

![Downloads](http://pepy.tech/badge/pysimpleguiwx)

 ![Awesome Meter](https://img.shields.io/badge/Awesome_meter-1000-yellow.svg)  

 ![Python Version](https://img.shields.io/badge/Python-3.x-yellow.svg)        


[![PyPI Version](https://img.shields.io/pypi/v/pysimpleguiwx.svg?style=for-the-badge)](https://pypi.org/project/pysimpleguiwx/)         


# PySimpleGUIWx        

The WxPython port of PySimpleGUI

## Primary PySimpleGUI Documentation

To get instructions on how use PySimpleGUI's APIs, please reference the [main documentation](http://www.PySimpleGUI.org). 
This Readme is for information ***specific to*** the WxPython port of PySimpleGUI.


## Why Use PySimpleGUIWx Over The Other Ports?

PySimpleGUIWx brings the number of PySimpleGUI ports to 3.

Why use PySimpleGUIWx over PySimpleGUIQt PySimpleGUI (tkinter version)?  

There are a couple of easy reasons to use PySimpleGUIWx over PySimpleGUIQt. One is footprint.  PyInstaller EXE for PySimpleGUIWx is 9 MB, on Qt it's 240 MB.  Another is cool widgets.  

WxPython has some nice advanced widgets that will be offered though PySimpleGUIWx, hopefully sooner than later.

The System Tray feature works well with a feature set identical to PySimpleGUIQt.  If you are looking for a System Tray feature, PySimpleGUIWx is recommended over PySimpleGUIQt ; the primary reason being size of the WxPython framework versus the size of Qt.  They both give you very similar features.  They look and behave in an ***identical*** fashion when using PySimpleGUI.  That's the beauty of the PSG SDK, the function calls are the same for all implementations of PySimpleGUI.  The source code is highly portable between the GUI frameworks.

This simple list is another way of looking at the question....

1.  It's simple and easy to program GUIs
2.  You can move between the GUI frameworks tkinter, Qt and WxPython by changing a single line of code, the import statement.
3.  Get the same custom layout and access to the same widgets but in a simple, easy to use and understand interface.
4.  It's fun to program GUIs again


 ## Engineering Pre-Release   Version 0.13.0

 [Announcements of Latest Developments](https://github.com/MikeTheWatchGuy/PySimpleGUI/issues/142)        

Having trouble? Visit the [GitHub site ](http://www.PySimpleGUI.com) and log an Issue.


## What Works

Remember, these are Engineering Releases.  Not all features are complete, but generally speaking those that are marked as completed and working are working quite well.  It's not an "Engineering Quality".  The completed features are at about a Beta level.

### Ready to use

#### Elements

* Text
* Input Text
* Buttons including file/folder browse
* Input multiline
* Output multiline
* Output
* Columns
* Frames - except cannot set colors yet
* Progress Meters
* Checkbox
* Radio Button
* Combobox
* Spinner
* Vertical and Horizontal Separators


#### Features

* System Tray
* Debug Print
* Invisible/Visible Elements
* All Popups
* Check box
* Keyboard key events
* Mouse wheel events
* Multiple windows
* Read with timeout
* Background images
* One Line Progress Meter (tm)
* Auto-closing windows
* No titlebar windows
* Grab anywhere windows
* Alpha channel
* Window size
* Window disappear/reappear
* Get screen size
* Get window location
* Change window size
* Window move
* Window minimize
* Window maximize
* Window Disable
* Window Enable
* Window Hide
* Window UnHide
* Window Bring to front
* Look and Feel settings
* Default Icon
* Base64 Icons
* PEP8 bindings for all element methods and functions


It won't take long to poke at these and hit errors.  For example, the code to do Button Updates is not complete.  Most of the time you won't be doing this. 

Due to the small size of the development team, features may feel a little "thin" for a while.  The idea is to implement with enough depth that 80% of the uses are covered.  It's a multi-pass, iterative approach.  

If you, the reader, are having problems or have hit a spot where something is not yet implemented, then open an Issue.  They are often completed in a day.  This process of users pushing the boundaries is what drives the priorities for development.  It's "real world" kinds of problems that have made PySimpleGUI what it is today.



## SystemTray

This was the first fully functioning feature of PySimpleGUIWx.  Previously only the Qt port supported the System Tray.  Why use Wx?  The footprint is much much smaller.  An EXE file created using PyInstaller is 9 MB for PySimpleGUIWx, when using Qt it's 240 MB.

Now it's possible to "tack on" the System Tray to your PySimpleGUI application. 

If you're unable to upgrade to Qt but want the System Tray feature, then adding PySimpleGUIWx to your project may be the way to go.  

You can mix your System Tray's event loop with your normal Window event loop by adding a timeout to both your Window.Read call and your SystemTray.Read call.

### Source code compatibility

PySimpleGUIWx's System Tray feature has been tested against the same PySimpleGUIQt feature.  As long as you don't use features that are not yet supported you'll find your source code will run on either PySimpleGUIQt or PySimpleGUIWx by changing the import statement.  


## System Tray Design Pattern

Here is a design pattern you can use to get a jump-start.

This program will create a system tray icon and perform a blocking Read. 

```python
import PySimpleGUIWx as sg

tray = sg.SystemTray(menu= ['menu',['Open', ['&Save::KEY', '---', 'Issues', '!Disabled'], 'E&xit']],
                     filename=r'C:\Python\PycharmProjects\PSG\default_icon.ico')
tray.ShowMessage('My Message', 'The tray icon is up and runnning!')
while True:
    event = tray.Read()
    print(event)
    if event == 'Exit':
        break
```


## Menu Definitions

See the original, full documentation for PySimpleGUI to get an understanding of how menus are defined.  


## SystemTray Methods

### Read - Read the context menu or check for events

```python
def Read(timeout=None)
    '''  
 Reads the context menu  
 :param timeout: Optional.  Any value other than None indicates a non-blocking read
 :return:   String representing meny item chosen. None if nothing read.  
    '''
```
The `timeout` parameter specifies how long to wait for an event to take place.  If nothing happens within the timeout period, then a "timeout event" is returned.  These types of reads make it possible to run asynchronously.  To run non-blocked, specify `timeout=0`on the Read call (not yet supported).

Read returns the menu text, complete with key, for the menu item chosen.  If you specified `Open::key` as the menu entry, and the user clicked on `Open`, then you will receive the string `Open::key` upon completion of the Read.

#### Read special return values

In addition to Menu Items, the Read call can return several special values.    They include:

EVENT_SYSTEM_TRAY_ICON_DOUBLE_CLICKED - Tray icon was double clicked
EVENT_SYSTEM_TRAY_ICON_ACTIVATED - Tray icon was single clicked
EVENT_SYSTEM_TRAY_MESSAGE_CLICKED - a message balloon was clicked
TIMEOUT_KEY is returned if no events are available if the timeout value is set in the Read call


### ShowMessage

Just like Qt, you can create a pop-up message.  Unlike Qt, you cannot set your own custom icon in the message, at least you can't at the moment.

The preset `messageicon` values are:

    SYSTEM_TRAY_MESSAGE_ICON_INFORMATION 
    SYSTEM_TRAY_MESSAGE_ICON_WARNING
    SYSTEM_TRAY_MESSAGE_ICON_CRITICAL 
    SYSTEM_TRAY_MESSAGE_ICON_NOICON

```python
ShowMessage(title, message, filename=None, data=None, data_base64=None, messageicon=None, time=10000):  
    '''  
 Shows a balloon above icon in system tray  
 :param title:  Title shown in balloon  
 :param message: Message to be displayed  
 :param filename: Optional icon filename  
 :param data: Optional in-ram icon  
 :param data_base64: Optional base64 icon  
 :param time: How long to display message in milliseconds  :return:  
 '''
```

### Update

You can update any of these items within a SystemTray object
* Menu definition
* Icon (not working yet)
* Tooltip

 Change them all or just 1.

```python
Update(menu=None, tooltip=None,filename=None, data=None, data_base64=None,)
    '''  
 Updates the menu, tooltip or icon  
 :param menu: menu defintion  
 :param tooltip: string representing tooltip  
 :param filename:  icon filename  
 :param data:  icon raw image  
 :param data_base64: icon base 64 image  
 :return:  
 '''
```
## Menus with Keys

You can add a key to your menu items.  To do so, you add :: and the key value to the end of your menu definition. 

`menu_def = ['File', ['Hide::key', '&Open::key', '&Save',['1', '2', ['a','b']], '&Properties', 'E&xit']]`

The menu definition adds a key "key" to the menu entries Hide and Open.

If you want to change the separator characters from :: top something else,change the variable `MENU_KEY_SEPARATOR`

When a menu item has a key and it is chosen, then entire string is returned.  If Hide were selected, then Hide::key would be returned from the Read.  Note that the shortcut character & is NOT returned from Reads.


## Popups

Starting with release 0.4.0, most of the Popup functions work.  This means you can do things like show information in a window when there's a choice made in a System Tray menu.  Or if your program finds some event it wishes to inform the user about.  For example, when new Issues are posted on a GitHub project.


# Release Notes:  

### 0.1.0   -   25-Dec-2018

* Support for SystemTray
  * Read, with or without a timeout
  * Catch single click, double click events
  * Source code compatiable with Qt

### 0.2.0   -   26-Dec-2018

* Correctly handling base64 images
* Support for clicking message balloon
* Can Hide and  UnHide the  icon


### 0.3.0   -   27-Dec-2018

* Hooked up buttons!
* Browse file button is only file/folder button that works
* Text, Input and Button elements are the only working elements
* SystemTray can take any kind of image as icon
* Read with Timeout (non-zero) works
* Popups


### 0.4.0 PySimpleGUIWx  30-Dec-2018

* Text Element - colors, font work
* Text Update method works
* Button - Close button implemented
* Button - Implemented basic button, correctly presented Values on Read
* Button - Can now set font
* Changed overall "App" variable usage for better mainloop control
* Windows - Timeouts and non-blocking Reads work
* Windows - Autoclose works
* Windows - Non-blocking calls supported (timeout=0)
* Windows - Grab anywhere works
* Windows - No title-bar works
* Windows - Location and Size working correctly
* Correctly adding element padding to Text, Input, Buttons
* Popups - most Popups work (except for the input type that involve folders)

### 0.5.0 PySimpleGUIWx 6-Jan-2019

* New element - Multiline input
* New element - Multiline output
* Borderless Windows
* Grab anywhere windows
* Alpha channel for windows
* Finishing up the Text and Input Text Elements
* Visibility for all Elements
* Input Get / Set focus
* Output element - unable to get stdout to re-route
* Debug window works


### 0.6.0 9-Jan-2019

* Column Element
* Checkbox Element with events
* Output Element
* Background Image (I think works)
* Debug Print
* One Line Progress Meter
* All Popups works

### 0.7.0 PySimpleGUIWx 21-Jan-2019

* Element.Update support for disabled and tooltip
* Combo Element
* Newest Combo parameters
* Radio Element
* Newest Radio parameters (size_px, visible, enable_events)
* Type hints on Wx widgets
* Spinner Element
* Newest Spinner parameters
* Text Element visibility
* Column Element size_px parameter (unclear if works... likely does not)
* Column visibility
* Column Update method added
* System Tray - support for any kind of image format for icons
* Window.Move
* Window.Minimize
* Window.Maximize
* Window.Disable
* Window.Enable
* Window.Hide
* Window.UnHide
* Window.BringToFront
* Popup non_blocking - returns window and button not just button
* More comprehensive test harness when running PySimpleGUIWx.py

### 0.8.0 20-Feb-2019 PySimpleGUIWx

* Big Try/Except block around Update method for multiline in case window closed
* Text - convert incoming text to string right away
* Text.Update - convert incoming value to string
* Completed Button.Update method.  Can now change text, color, etc.
* Added Try around reading multiline input value - not sure why needed
* OneLineProgressMeter - can update text on every call now

### 0.9.0 06-Mar-2019 PySimpleGUIWx

* Addition of Assert Suppression
   * This was needed for a  multi-threaded version of PySimpleGUIWx
   * Complained when exiting a system tray if did not make this change and ran the tray in a thread
* Tray.Close now correctly Hides the icon
* SetGlobalIcon functional
* Can also now set icon using SetOptions call


### 0.10.0 23-Mar-2019 PySimpleGUIWx

* `do_not_clear` is now TRUE by default on Input and Multiline elements!!


## 0.11.0 11-Apr-2019 PySimpleGUIWx

* NEW Window parameter layout so can skip calling Layout

## 0.13.0 1-OCT-2019 PySimpleGUIWx

* Version numbering using sg.version string
* PEP8 bindings!
* Improved scaling of character to pixel sizes of elements that are multilined
* Added Metadata variable to all elements
* Renamed element callback functions to start with _
* Removed __del__ methods everywhere except Output Element
* Can "Call" an element which will call its Update method
* InputText element - convert default text and password char to string 
* Removed old code such as tkinter's tooltip and drag and drop from Qt
* Shortcut I for InputText
* Listbox added size_px parm
* Changed type checking to use the comment style types
* Added Element.Widget to all Elements so can access the Wx widgets directly
* Text Element now defaults to '' so no need to specify anything if a blank Text Element (often used for output)
* Button text converted to string when creating button
* New Button shortcuts - B, Btn
* VerticalSeparator - Newly supported Element
* HorizontalSeparator - Newly supported Element
* Slider - added size_px parm
* Fixed leak caused by System Tray not cleaning up the timer
* Window - added finalize paramter so can skip using chained .Finalize()
* Window - AllKeysDict now used like other PySimpleGUI ports. Has all the keys and elements in a window
* Window.FindElement - added silent_on_error parm like other ports have
* Window[key] construct added that calls FindElement
* window() - can "Call" a window you've created. Will call Window.Read()
* Popup buttons no longer use CloseButtons for normal popups.  Calls window.Close manually
* PopupGetFolder changed to use keys, normal button, new window design patterns
* PopupGetFile changed to use keys, normal buttons, new window design patterns
* PopupGetText changed to use keys, normal buttons, new window design patterns
* Default application (PySimpleGUI.main) now shows the version number like other PySimpleGUI ports

## 0.13.0 17-Nov-2019 PySimpleGUIWx

* 105 Look and Feel Themes to choose from!
* New "Fuzzy" look and feel selection
* Preview all look and feels not yet supported due to lack of Frame support

## 0.15.0 PySimpleGUIWx 24-Dec-2019

Themes!

* Picked up the new "theme" APIs like all 4 ports got
* Dark Blue 3 is the new official color theme for PySimpleGUI
* Added "port" string so that your code can detect which port of PySimpleGUI is being executed
* Removed restriction on Macs (totally didn't make sense that it was there as it blocked a tkinter problem, not a Wx one)
* Depricated the TRANSPARENT_BUTTON variable as it was being misunderstood by users and was misleading
* BROWSE_FILES_DELIMITER can be changed to change the default ';' delimeter between filenames in FilesBrowse button
* Frame Element!  BUT, it's only a partial solution as I am unable to set the background color (need to understand how panels work). It's better than nothing


## 0.16.0 PySimpleGUIWx 6-May-2020

* Added constants
    * WIN_CLOSED and WINDOW_CLOSED
    * EVENT_TIMEOUT and TIMEOUT_EVENT
* Added Graph.change_coordinates method
* Added close parameter to Window.read


## 0.17.0 PySimpleGUIWx 6-Jun-2020

Element justification within Window and Containers!  Finally a unified justification

* When any Radio element is updated to be False, the entire GROUP is reset so nothing is selected
* element_jutification added so that all elements inside these will be justified accordingly.
	* For PySimpleGUIQt only, the default is "float" which sets nothing. Buttons will stretch across the window as result
	* Valid values are 'l', 'r', 'c'.  You can spell it out, but only first letter is used.
	* Window
	* Frame
	* Column
	* Tab

## 0.17.1 PySimpleGUIWx 7-Jun-2020

* Quick patch of Multiline.update so that newlines are recognized correctly


# Design        
# Author 
 Mike B.        


# License        
 GNU Lesser General Public License (LGPL 3) +        

# Acknowledgments
<!--stackedit_data:
eyJoaXN0b3J5IjpbLTIxNDIwNTI0ODQsODg2MzA1Mjk2XX0=
-->



%package help
Summary:	Development documents and examples for PySimpleGUIWx
Provides:	python3-PySimpleGUIWx-doc
%description help

![pysimplegui_logo](https://user-images.githubusercontent.com/13696193/43165867-fe02e3b2-8f62-11e8-9fd0-cc7c86b11772.png)        

![Downloads](http://pepy.tech/badge/pysimpleguiwx)

 ![Awesome Meter](https://img.shields.io/badge/Awesome_meter-1000-yellow.svg)  

 ![Python Version](https://img.shields.io/badge/Python-3.x-yellow.svg)        


[![PyPI Version](https://img.shields.io/pypi/v/pysimpleguiwx.svg?style=for-the-badge)](https://pypi.org/project/pysimpleguiwx/)         


# PySimpleGUIWx        

The WxPython port of PySimpleGUI

## Primary PySimpleGUI Documentation

To get instructions on how use PySimpleGUI's APIs, please reference the [main documentation](http://www.PySimpleGUI.org). 
This Readme is for information ***specific to*** the WxPython port of PySimpleGUI.


## Why Use PySimpleGUIWx Over The Other Ports?

PySimpleGUIWx brings the number of PySimpleGUI ports to 3.

Why use PySimpleGUIWx over PySimpleGUIQt PySimpleGUI (tkinter version)?  

There are a couple of easy reasons to use PySimpleGUIWx over PySimpleGUIQt. One is footprint.  PyInstaller EXE for PySimpleGUIWx is 9 MB, on Qt it's 240 MB.  Another is cool widgets.  

WxPython has some nice advanced widgets that will be offered though PySimpleGUIWx, hopefully sooner than later.

The System Tray feature works well with a feature set identical to PySimpleGUIQt.  If you are looking for a System Tray feature, PySimpleGUIWx is recommended over PySimpleGUIQt ; the primary reason being size of the WxPython framework versus the size of Qt.  They both give you very similar features.  They look and behave in an ***identical*** fashion when using PySimpleGUI.  That's the beauty of the PSG SDK, the function calls are the same for all implementations of PySimpleGUI.  The source code is highly portable between the GUI frameworks.

This simple list is another way of looking at the question....

1.  It's simple and easy to program GUIs
2.  You can move between the GUI frameworks tkinter, Qt and WxPython by changing a single line of code, the import statement.
3.  Get the same custom layout and access to the same widgets but in a simple, easy to use and understand interface.
4.  It's fun to program GUIs again


 ## Engineering Pre-Release   Version 0.13.0

 [Announcements of Latest Developments](https://github.com/MikeTheWatchGuy/PySimpleGUI/issues/142)        

Having trouble? Visit the [GitHub site ](http://www.PySimpleGUI.com) and log an Issue.


## What Works

Remember, these are Engineering Releases.  Not all features are complete, but generally speaking those that are marked as completed and working are working quite well.  It's not an "Engineering Quality".  The completed features are at about a Beta level.

### Ready to use

#### Elements

* Text
* Input Text
* Buttons including file/folder browse
* Input multiline
* Output multiline
* Output
* Columns
* Frames - except cannot set colors yet
* Progress Meters
* Checkbox
* Radio Button
* Combobox
* Spinner
* Vertical and Horizontal Separators


#### Features

* System Tray
* Debug Print
* Invisible/Visible Elements
* All Popups
* Check box
* Keyboard key events
* Mouse wheel events
* Multiple windows
* Read with timeout
* Background images
* One Line Progress Meter (tm)
* Auto-closing windows
* No titlebar windows
* Grab anywhere windows
* Alpha channel
* Window size
* Window disappear/reappear
* Get screen size
* Get window location
* Change window size
* Window move
* Window minimize
* Window maximize
* Window Disable
* Window Enable
* Window Hide
* Window UnHide
* Window Bring to front
* Look and Feel settings
* Default Icon
* Base64 Icons
* PEP8 bindings for all element methods and functions


It won't take long to poke at these and hit errors.  For example, the code to do Button Updates is not complete.  Most of the time you won't be doing this. 

Due to the small size of the development team, features may feel a little "thin" for a while.  The idea is to implement with enough depth that 80% of the uses are covered.  It's a multi-pass, iterative approach.  

If you, the reader, are having problems or have hit a spot where something is not yet implemented, then open an Issue.  They are often completed in a day.  This process of users pushing the boundaries is what drives the priorities for development.  It's "real world" kinds of problems that have made PySimpleGUI what it is today.



## SystemTray

This was the first fully functioning feature of PySimpleGUIWx.  Previously only the Qt port supported the System Tray.  Why use Wx?  The footprint is much much smaller.  An EXE file created using PyInstaller is 9 MB for PySimpleGUIWx, when using Qt it's 240 MB.

Now it's possible to "tack on" the System Tray to your PySimpleGUI application. 

If you're unable to upgrade to Qt but want the System Tray feature, then adding PySimpleGUIWx to your project may be the way to go.  

You can mix your System Tray's event loop with your normal Window event loop by adding a timeout to both your Window.Read call and your SystemTray.Read call.

### Source code compatibility

PySimpleGUIWx's System Tray feature has been tested against the same PySimpleGUIQt feature.  As long as you don't use features that are not yet supported you'll find your source code will run on either PySimpleGUIQt or PySimpleGUIWx by changing the import statement.  


## System Tray Design Pattern

Here is a design pattern you can use to get a jump-start.

This program will create a system tray icon and perform a blocking Read. 

```python
import PySimpleGUIWx as sg

tray = sg.SystemTray(menu= ['menu',['Open', ['&Save::KEY', '---', 'Issues', '!Disabled'], 'E&xit']],
                     filename=r'C:\Python\PycharmProjects\PSG\default_icon.ico')
tray.ShowMessage('My Message', 'The tray icon is up and runnning!')
while True:
    event = tray.Read()
    print(event)
    if event == 'Exit':
        break
```


## Menu Definitions

See the original, full documentation for PySimpleGUI to get an understanding of how menus are defined.  


## SystemTray Methods

### Read - Read the context menu or check for events

```python
def Read(timeout=None)
    '''  
 Reads the context menu  
 :param timeout: Optional.  Any value other than None indicates a non-blocking read
 :return:   String representing meny item chosen. None if nothing read.  
    '''
```
The `timeout` parameter specifies how long to wait for an event to take place.  If nothing happens within the timeout period, then a "timeout event" is returned.  These types of reads make it possible to run asynchronously.  To run non-blocked, specify `timeout=0`on the Read call (not yet supported).

Read returns the menu text, complete with key, for the menu item chosen.  If you specified `Open::key` as the menu entry, and the user clicked on `Open`, then you will receive the string `Open::key` upon completion of the Read.

#### Read special return values

In addition to Menu Items, the Read call can return several special values.    They include:

EVENT_SYSTEM_TRAY_ICON_DOUBLE_CLICKED - Tray icon was double clicked
EVENT_SYSTEM_TRAY_ICON_ACTIVATED - Tray icon was single clicked
EVENT_SYSTEM_TRAY_MESSAGE_CLICKED - a message balloon was clicked
TIMEOUT_KEY is returned if no events are available if the timeout value is set in the Read call


### ShowMessage

Just like Qt, you can create a pop-up message.  Unlike Qt, you cannot set your own custom icon in the message, at least you can't at the moment.

The preset `messageicon` values are:

    SYSTEM_TRAY_MESSAGE_ICON_INFORMATION 
    SYSTEM_TRAY_MESSAGE_ICON_WARNING
    SYSTEM_TRAY_MESSAGE_ICON_CRITICAL 
    SYSTEM_TRAY_MESSAGE_ICON_NOICON

```python
ShowMessage(title, message, filename=None, data=None, data_base64=None, messageicon=None, time=10000):  
    '''  
 Shows a balloon above icon in system tray  
 :param title:  Title shown in balloon  
 :param message: Message to be displayed  
 :param filename: Optional icon filename  
 :param data: Optional in-ram icon  
 :param data_base64: Optional base64 icon  
 :param time: How long to display message in milliseconds  :return:  
 '''
```

### Update

You can update any of these items within a SystemTray object
* Menu definition
* Icon (not working yet)
* Tooltip

 Change them all or just 1.

```python
Update(menu=None, tooltip=None,filename=None, data=None, data_base64=None,)
    '''  
 Updates the menu, tooltip or icon  
 :param menu: menu defintion  
 :param tooltip: string representing tooltip  
 :param filename:  icon filename  
 :param data:  icon raw image  
 :param data_base64: icon base 64 image  
 :return:  
 '''
```
## Menus with Keys

You can add a key to your menu items.  To do so, you add :: and the key value to the end of your menu definition. 

`menu_def = ['File', ['Hide::key', '&Open::key', '&Save',['1', '2', ['a','b']], '&Properties', 'E&xit']]`

The menu definition adds a key "key" to the menu entries Hide and Open.

If you want to change the separator characters from :: top something else,change the variable `MENU_KEY_SEPARATOR`

When a menu item has a key and it is chosen, then entire string is returned.  If Hide were selected, then Hide::key would be returned from the Read.  Note that the shortcut character & is NOT returned from Reads.


## Popups

Starting with release 0.4.0, most of the Popup functions work.  This means you can do things like show information in a window when there's a choice made in a System Tray menu.  Or if your program finds some event it wishes to inform the user about.  For example, when new Issues are posted on a GitHub project.


# Release Notes:  

### 0.1.0   -   25-Dec-2018

* Support for SystemTray
  * Read, with or without a timeout
  * Catch single click, double click events
  * Source code compatiable with Qt

### 0.2.0   -   26-Dec-2018

* Correctly handling base64 images
* Support for clicking message balloon
* Can Hide and  UnHide the  icon


### 0.3.0   -   27-Dec-2018

* Hooked up buttons!
* Browse file button is only file/folder button that works
* Text, Input and Button elements are the only working elements
* SystemTray can take any kind of image as icon
* Read with Timeout (non-zero) works
* Popups


### 0.4.0 PySimpleGUIWx  30-Dec-2018

* Text Element - colors, font work
* Text Update method works
* Button - Close button implemented
* Button - Implemented basic button, correctly presented Values on Read
* Button - Can now set font
* Changed overall "App" variable usage for better mainloop control
* Windows - Timeouts and non-blocking Reads work
* Windows - Autoclose works
* Windows - Non-blocking calls supported (timeout=0)
* Windows - Grab anywhere works
* Windows - No title-bar works
* Windows - Location and Size working correctly
* Correctly adding element padding to Text, Input, Buttons
* Popups - most Popups work (except for the input type that involve folders)

### 0.5.0 PySimpleGUIWx 6-Jan-2019

* New element - Multiline input
* New element - Multiline output
* Borderless Windows
* Grab anywhere windows
* Alpha channel for windows
* Finishing up the Text and Input Text Elements
* Visibility for all Elements
* Input Get / Set focus
* Output element - unable to get stdout to re-route
* Debug window works


### 0.6.0 9-Jan-2019

* Column Element
* Checkbox Element with events
* Output Element
* Background Image (I think works)
* Debug Print
* One Line Progress Meter
* All Popups works

### 0.7.0 PySimpleGUIWx 21-Jan-2019

* Element.Update support for disabled and tooltip
* Combo Element
* Newest Combo parameters
* Radio Element
* Newest Radio parameters (size_px, visible, enable_events)
* Type hints on Wx widgets
* Spinner Element
* Newest Spinner parameters
* Text Element visibility
* Column Element size_px parameter (unclear if works... likely does not)
* Column visibility
* Column Update method added
* System Tray - support for any kind of image format for icons
* Window.Move
* Window.Minimize
* Window.Maximize
* Window.Disable
* Window.Enable
* Window.Hide
* Window.UnHide
* Window.BringToFront
* Popup non_blocking - returns window and button not just button
* More comprehensive test harness when running PySimpleGUIWx.py

### 0.8.0 20-Feb-2019 PySimpleGUIWx

* Big Try/Except block around Update method for multiline in case window closed
* Text - convert incoming text to string right away
* Text.Update - convert incoming value to string
* Completed Button.Update method.  Can now change text, color, etc.
* Added Try around reading multiline input value - not sure why needed
* OneLineProgressMeter - can update text on every call now

### 0.9.0 06-Mar-2019 PySimpleGUIWx

* Addition of Assert Suppression
   * This was needed for a  multi-threaded version of PySimpleGUIWx
   * Complained when exiting a system tray if did not make this change and ran the tray in a thread
* Tray.Close now correctly Hides the icon
* SetGlobalIcon functional
* Can also now set icon using SetOptions call


### 0.10.0 23-Mar-2019 PySimpleGUIWx

* `do_not_clear` is now TRUE by default on Input and Multiline elements!!


## 0.11.0 11-Apr-2019 PySimpleGUIWx

* NEW Window parameter layout so can skip calling Layout

## 0.13.0 1-OCT-2019 PySimpleGUIWx

* Version numbering using sg.version string
* PEP8 bindings!
* Improved scaling of character to pixel sizes of elements that are multilined
* Added Metadata variable to all elements
* Renamed element callback functions to start with _
* Removed __del__ methods everywhere except Output Element
* Can "Call" an element which will call its Update method
* InputText element - convert default text and password char to string 
* Removed old code such as tkinter's tooltip and drag and drop from Qt
* Shortcut I for InputText
* Listbox added size_px parm
* Changed type checking to use the comment style types
* Added Element.Widget to all Elements so can access the Wx widgets directly
* Text Element now defaults to '' so no need to specify anything if a blank Text Element (often used for output)
* Button text converted to string when creating button
* New Button shortcuts - B, Btn
* VerticalSeparator - Newly supported Element
* HorizontalSeparator - Newly supported Element
* Slider - added size_px parm
* Fixed leak caused by System Tray not cleaning up the timer
* Window - added finalize paramter so can skip using chained .Finalize()
* Window - AllKeysDict now used like other PySimpleGUI ports. Has all the keys and elements in a window
* Window.FindElement - added silent_on_error parm like other ports have
* Window[key] construct added that calls FindElement
* window() - can "Call" a window you've created. Will call Window.Read()
* Popup buttons no longer use CloseButtons for normal popups.  Calls window.Close manually
* PopupGetFolder changed to use keys, normal button, new window design patterns
* PopupGetFile changed to use keys, normal buttons, new window design patterns
* PopupGetText changed to use keys, normal buttons, new window design patterns
* Default application (PySimpleGUI.main) now shows the version number like other PySimpleGUI ports

## 0.13.0 17-Nov-2019 PySimpleGUIWx

* 105 Look and Feel Themes to choose from!
* New "Fuzzy" look and feel selection
* Preview all look and feels not yet supported due to lack of Frame support

## 0.15.0 PySimpleGUIWx 24-Dec-2019

Themes!

* Picked up the new "theme" APIs like all 4 ports got
* Dark Blue 3 is the new official color theme for PySimpleGUI
* Added "port" string so that your code can detect which port of PySimpleGUI is being executed
* Removed restriction on Macs (totally didn't make sense that it was there as it blocked a tkinter problem, not a Wx one)
* Depricated the TRANSPARENT_BUTTON variable as it was being misunderstood by users and was misleading
* BROWSE_FILES_DELIMITER can be changed to change the default ';' delimeter between filenames in FilesBrowse button
* Frame Element!  BUT, it's only a partial solution as I am unable to set the background color (need to understand how panels work). It's better than nothing


## 0.16.0 PySimpleGUIWx 6-May-2020

* Added constants
    * WIN_CLOSED and WINDOW_CLOSED
    * EVENT_TIMEOUT and TIMEOUT_EVENT
* Added Graph.change_coordinates method
* Added close parameter to Window.read


## 0.17.0 PySimpleGUIWx 6-Jun-2020

Element justification within Window and Containers!  Finally a unified justification

* When any Radio element is updated to be False, the entire GROUP is reset so nothing is selected
* element_jutification added so that all elements inside these will be justified accordingly.
	* For PySimpleGUIQt only, the default is "float" which sets nothing. Buttons will stretch across the window as result
	* Valid values are 'l', 'r', 'c'.  You can spell it out, but only first letter is used.
	* Window
	* Frame
	* Column
	* Tab

## 0.17.1 PySimpleGUIWx 7-Jun-2020

* Quick patch of Multiline.update so that newlines are recognized correctly


# Design        
# Author 
 Mike B.        


# License        
 GNU Lesser General Public License (LGPL 3) +        

# Acknowledgments
<!--stackedit_data:
eyJoaXN0b3J5IjpbLTIxNDIwNTI0ODQsODg2MzA1Mjk2XX0=
-->



%prep
%autosetup -n PySimpleGUIWx-0.17.2

%build
%py3_build

%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
	find usr/lib -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
	find usr/lib64 -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
	find usr/bin -type f -printf "/%h/%f\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
	find usr/sbin -type f -printf "/%h/%f\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
	find usr/share/man -type f -printf "/%h/%f.gz\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .

%files -n python3-PySimpleGUIWx -f filelist.lst
%dir %{python3_sitelib}/*

%files help -f doclist.lst
%{_docdir}/*

%changelog
* Wed May 31 2023 Python_Bot <Python_Bot@openeuler.org> - 0.17.2-1
- Package Spec generated