commit
5132525cb8
|
@ -1,5 +1,5 @@
|
|||
#!/usr/bin/python3
|
||||
version = __version__ = "4.28.0.23 Unreleased 3-Aug-2020\nAdded a referesh to visiblity_changed (an existing function but blank), added Column.contents_changed which will update the scrollbar so corrently match the contents, separators expand only in 1 direction now, added SYBOOLS for arrows circle square, dark grey 8 theme, when closing window don't delete the tkroot variable and rows but instead set to None, dark grey 9 theme, replaced check for darkwin with try/except for wm_overrideredirect, fix for Column/window element justification, new vertical_alignment parm for Columns, vertical_alignment parm added to Frame, vertical_alignment added to pin func, vtop/vcenter/vbottom vertical alignment layout helper funcs, fixed statusbar expansion, added disabled button to theme previewer, grab anywhere stop motion was setting position to None and causing error. changed to event.x, expanded main to include popup tests, made vtop/vcenter/vbottom capable of taking an entire row as well as a single element, grab parameter for Text Element, added symbol left, added tclversion_detailed, all themes changed the progress bar definition that had a DEFAULT indicator because of bug it caused when swapping themes, added expand_x and expand_y to Columns, fix for Calendar Button, force focus when no-titlebar window, added Window.force_focus, do not close hidden master window, disable close on one_line_progress_meter - was causing next window to not work right when close with X, changed back toplevel to no parent"
|
||||
version = __version__ = "4.29.0 Released 25-Aug-2020"
|
||||
|
||||
port = 'PySimpleGUI'
|
||||
|
||||
|
@ -31,7 +31,7 @@ port = 'PySimpleGUI'
|
|||
"""
|
||||
Copyright 2018, 2019, 2020 PySimpleGUI.org
|
||||
|
||||
OK, let's get the bullshit out of the way
|
||||
OK, let's get the BS out of the way
|
||||
|
||||
This software is available for your use under a MODIFIED LGPL3+ license
|
||||
|
||||
|
|
|
@ -1122,8 +1122,12 @@ Column(layout,
|
|||
key=None,
|
||||
k=None,
|
||||
visible=True,
|
||||
justification="left",
|
||||
element_justification="left",
|
||||
justification=None,
|
||||
element_justification=None,
|
||||
vertical_alignment=None,
|
||||
grab=None,
|
||||
expand_x=None,
|
||||
expand_y=None,
|
||||
metadata=None)
|
||||
```
|
||||
|
||||
|
@ -1143,6 +1147,10 @@ Parameter Descriptions:
|
|||
| bool | visible | set visibility state of the element |
|
||||
| str | justification | set justification for the Column itself. Note entire row containing the Column will be affected |
|
||||
| str | element_justification | All elements inside the Column will have this justification 'left', 'right', 'center' are valid values |
|
||||
| str | vertical_alignment | Place the column at the 'top', 'center', 'bottom' of the row (can also use t,c,r). Defaults to no setting (tkinter decides) |
|
||||
| bool | grab | If True can grab this element and move the window around. Default is False |
|
||||
| bool | expand_x | If True the column will automatically expand in the X direction to fill available space |
|
||||
| bool | expand_y | If True the column will automatically expand in the Y direction to fill available space |
|
||||
| Any | metadata | User metadata that can be set to ANYTHING |
|
||||
|
||||
### AddRow
|
||||
|
@ -1708,6 +1716,7 @@ Frame(title,
|
|||
right_click_menu=None,
|
||||
visible=True,
|
||||
element_justification="left",
|
||||
vertical_alignment=None,
|
||||
metadata=None)
|
||||
```
|
||||
|
||||
|
@ -1731,6 +1740,7 @@ Parameter Descriptions:
|
|||
| List[List[Union[List[str],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. |
|
||||
| bool | visible | set visibility state of the element |
|
||||
| str | element_justification | All elements inside the Frame will have this justification 'left', 'right', 'center' are valid values |
|
||||
| str | vertical_alignment | Place the column at the 'top', 'center', 'bottom' of the row (can also use t,c,r). Defaults to no setting (tkinter decides) |
|
||||
| Any | metadata | User metadata that can be set to ANYTHING |
|
||||
|
||||
### AddRow
|
||||
|
@ -6518,6 +6528,7 @@ StatusBar(text,
|
|||
pad=None,
|
||||
key=None,
|
||||
k=None,
|
||||
right_click_menu=None,
|
||||
tooltip=None,
|
||||
visible=True,
|
||||
metadata=None)
|
||||
|
@ -6540,6 +6551,7 @@ Parameter Descriptions:
|
|||
| (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | pad | Amount of padding to put around element (left/right, top/bottom) or ((left, right), (top, bottom)) |
|
||||
| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element to uniquely identify this element |
|
||||
| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. |
|
||||
| List[List[Union[List[str],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. |
|
||||
| str | tooltip | text, that will appear when mouse hovers over the element |
|
||||
| bool | visible | set visibility state of the element |
|
||||
| Any | metadata | User metadata that can be set to ANYTHING |
|
||||
|
@ -7887,6 +7899,7 @@ Text(text="",
|
|||
key=None,
|
||||
k=None,
|
||||
right_click_menu=None,
|
||||
grab=None,
|
||||
tooltip=None,
|
||||
visible=True,
|
||||
metadata=None)
|
||||
|
@ -7911,6 +7924,7 @@ Parameter Descriptions:
|
|||
| Union[str, int, tuple, object] | key | Used with window.FindElement and with return values to uniquely identify this element to uniquely identify this element |
|
||||
| Union[str, int, tuple, object] | k | Same as the Key. You can use either k or key. Which ever is set will be used. |
|
||||
| List[List[Union[List[str],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. |
|
||||
| bool | grab | If True can grab this element and move the window around. Default is False |
|
||||
| str | tooltip | text, that will appear when mouse hovers over the element |
|
||||
| bool | visible | set visibility state of the element |
|
||||
| Any | metadata | User metadata that can be set to ANYTHING |
|
||||
|
@ -9304,9 +9318,8 @@ UnHide()
|
|||
|
||||
### VisibilityChanged
|
||||
|
||||
Not used in tkinter, but supplied becuase it is used in Qt. Want to remain source code compatible so that if
|
||||
you are making this call in your PySimpleGUIQt code, you can switch to PySimpleGUI and it will not complain
|
||||
about a missing method. Just know that in this version of PySimpleGUI, it does nothing
|
||||
When making an element in a column or someplace that has a scrollbar, then you'll want to call this function
|
||||
prior to the column's contents_changed() method.
|
||||
|
||||
```python
|
||||
VisibilityChanged()
|
||||
|
@ -9629,6 +9642,14 @@ Returns the Element that currently has focus as reported by tkinter. If no eleme
|
|||
|---|---|---|
|
||||
|<type>| **return** | An Element if one has been found with focus or None if no element found |
|
||||
|
||||
### force_focus
|
||||
|
||||
Forces this window to take focus
|
||||
|
||||
```python
|
||||
force_focus()
|
||||
```
|
||||
|
||||
### get_screen_dimensions
|
||||
|
||||
Get the screen dimensions. NOTE - you must have a window already open for this to work (blame tkinter not me)
|
||||
|
@ -9908,9 +9929,8 @@ un_hide()
|
|||
|
||||
### visibility_changed
|
||||
|
||||
Not used in tkinter, but supplied becuase it is used in Qt. Want to remain source code compatible so that if
|
||||
you are making this call in your PySimpleGUIQt code, you can switch to PySimpleGUI and it will not complain
|
||||
about a missing method. Just know that in this version of PySimpleGUI, it does nothing
|
||||
When making an element in a column or someplace that has a scrollbar, then you'll want to call this function
|
||||
prior to the column's contents_changed() method.
|
||||
|
||||
```python
|
||||
visibility_changed()
|
||||
|
@ -9985,6 +10005,7 @@ CalendarButton(button_text,
|
|||
bind_return_key=False,
|
||||
focus=False,
|
||||
pad=None,
|
||||
enable_events=None,
|
||||
key=None,
|
||||
k=None,
|
||||
locale=None,
|
||||
|
@ -13965,15 +13986,54 @@ Parameter Descriptions:
|
|||
| (Dict[Any:Any]) | values_dict | A dictionary with element keys as key and value is values parm for Update call |
|
||||
| None | **RETURN** | None
|
||||
|
||||
## Element Visibility
|
||||
## Layout Helper Funcs
|
||||
|
||||
Pin's an element provided into a layout so that when it's made invisible and visible again, it will
|
||||
be in the correct place. Otherwise it will be placed at the end of its containing window/column.
|
||||
|
||||
```
|
||||
pin(elem)
|
||||
pin(elem, vertical_alignment=None)
|
||||
```
|
||||
|
||||
Align an element or a row of elements to the bottom of the row that contains it
|
||||
|
||||
```
|
||||
vbottom(elem_or_row)
|
||||
```
|
||||
|
||||
Parameter Descriptions:
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|--|--|--|
|
||||
| Union[Element, List[Element], Tuple[Element]] | elem_or_row | the element or row of elements |
|
||||
| Union[Column, List[Column]] | **RETURN** | A column element containing the provided element aligned to the bottom or list of elements (a row)
|
||||
|
||||
Align an element or a row of elements to the center of the row that contains it
|
||||
|
||||
```
|
||||
vcenter(elem_or_row)
|
||||
```
|
||||
|
||||
Parameter Descriptions:
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|--|--|--|
|
||||
| Union[Element, List[Element], Tuple[Element]] | elem_or_row | the element or row of elements |
|
||||
| Union[Column, List[Column]] | **RETURN** | A column element containing the provided element aligned to the center or list of elements (a row)
|
||||
|
||||
Align an element or a row of elements to the top of the row that contains it
|
||||
|
||||
```
|
||||
vtop(elem_or_row)
|
||||
```
|
||||
|
||||
Parameter Descriptions:
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|--|--|--|
|
||||
| Union[Element, List[Element], Tuple[Element]] | elem_or_row | the element or row of elements |
|
||||
| Union[Column, List[Column]] | **RETURN** | A column element containing the provided element aligned to the top or list of elements (a row)
|
||||
|
||||
## Configuration / Settings / Extensions
|
||||
|
||||
Returns the dictionary of the global variables
|
||||
|
|
|
@ -3573,9 +3573,9 @@ Traceback (most recent call last):
|
|||
main()
|
||||
File "C:/Users/mike/.PyCharmCE2019.1/config/scratches/scratch_978 - key error example.py", line 17, in main
|
||||
window['-O U T'].update(values['-IN-'])
|
||||
File "C:\Python\PycharmProjects\GooeyGUI\PySimpleGUI.py", line 8591, in __getitem__
|
||||
File "C:\Python\PycharmProjects\PSG\PySimpleGUI.py", line 8591, in __getitem__
|
||||
return self.FindElement(key)
|
||||
File "C:\Python\PycharmProjects\GooeyGUI\PySimpleGUI.py", line 7709, in FindElement
|
||||
File "C:\Python\PycharmProjects\PSG\PySimpleGUI.py", line 7709, in FindElement
|
||||
raise KeyError(key)
|
||||
KeyError: '-O U T'
|
||||
```
|
||||
|
@ -7690,6 +7690,45 @@ Element pinning for invisibility!
|
|||
* spin arrow color automatically set to text color
|
||||
* Bad element key popup - fix for displaying correct line info in some situations
|
||||
|
||||
## 4.29.0 PySimpleGUI 25-Aug-2020
|
||||
|
||||
Custom titlebar capabilities (several new features required)
|
||||
Better Alignment
|
||||
Calendar button works again
|
||||
|
||||
* Window.visiblity_changed now refreshes the window
|
||||
* Added Column.contents_changed which will update the scrollbar so corrently match the contents
|
||||
* Separators expand only in 1 direction now
|
||||
* Added 8 SYMBOLS:
|
||||
SYMBOL_SQUARE = '█'
|
||||
SYMBOL_CIRCLE = '⚫'
|
||||
SYMBOL_CIRCLE_OUTLINE = '◯'
|
||||
SYMBOL_UP = '▲'
|
||||
SYMBOL_RIGHT = '►'
|
||||
SYMBOL_LEFT = '◄'
|
||||
SYMBOL_DOWN = '▼'
|
||||
SYMBOL_X = '❎'
|
||||
* New dark themes - dark grey 8, dark grey 9, dark green 9, dark purple 7
|
||||
* When closing window no longer deletes the tkroot variable and rows but instead set to None
|
||||
* Changd no-titlebar code to use try/except. Previously removed for Mac due to tk 8.6.10 errors calling wm_overrideredirect
|
||||
* Fix for Column/window element justification
|
||||
* New vertical_alignment parm for Column, Frame, pin
|
||||
* New layout helper functions - vtop/vcenter/vbottom - Can pass an element or a row of elements
|
||||
* Fixed statusbar expansion
|
||||
* Added disabled button to theme previewer
|
||||
* Fixed grab anywhere stop motion bug - was setting position to None and causing error changed to event.x
|
||||
* Expanded main to include popup tests, theme tests, ability to hide tabs
|
||||
* Grab parameter for Text Element, Column Element
|
||||
* Added tclversion_detailed to get the detailed tkinter version
|
||||
* All themes changed the progress bar definition that had a "DEFAULT" indicator. New constant DEFAULT_PROGRESS_BAR_COMPUTE indicates the other theme colors should be used to create the progess bar colors.
|
||||
* Added expand_x and expand_y parameters to Columns
|
||||
* Fix for Calendar Button. Still needs to be fixed for read_all_windows
|
||||
* Force focus when no-titlebar window. Needed for Raspberry Pi
|
||||
* Added Window.force_focus
|
||||
* No longer closes the hidden master window. Closing it caused a memory leak within tkinter
|
||||
* Disable close on one_line_progress_meter. There is a cancel button that will close the window
|
||||
* Changed back toplevel to no parent - was causing problems with timeout=0 windows
|
||||
|
||||
### Upcoming
|
||||
|
||||
There will always be overlapping work as the ports will never actually be "complete" as there's always something new that can be built. However there's a definition for the base functionality for PySimpleGUI. This is what is being strived for with the current ports that are underway.
|
||||
|
|
43
readme.md
43
readme.md
|
@ -3573,9 +3573,9 @@ Traceback (most recent call last):
|
|||
main()
|
||||
File "C:/Users/mike/.PyCharmCE2019.1/config/scratches/scratch_978 - key error example.py", line 17, in main
|
||||
window['-O U T'].update(values['-IN-'])
|
||||
File "C:\Python\PycharmProjects\GooeyGUI\PySimpleGUI.py", line 8591, in __getitem__
|
||||
File "C:\Python\PycharmProjects\PSG\PySimpleGUI.py", line 8591, in __getitem__
|
||||
return self.FindElement(key)
|
||||
File "C:\Python\PycharmProjects\GooeyGUI\PySimpleGUI.py", line 7709, in FindElement
|
||||
File "C:\Python\PycharmProjects\PSG\PySimpleGUI.py", line 7709, in FindElement
|
||||
raise KeyError(key)
|
||||
KeyError: '-O U T'
|
||||
```
|
||||
|
@ -7690,6 +7690,45 @@ Element pinning for invisibility!
|
|||
* spin arrow color automatically set to text color
|
||||
* Bad element key popup - fix for displaying correct line info in some situations
|
||||
|
||||
## 4.29.0 PySimpleGUI 25-Aug-2020
|
||||
|
||||
Custom titlebar capabilities (several new features required)
|
||||
Better Alignment
|
||||
Calendar button works again
|
||||
|
||||
* Window.visiblity_changed now refreshes the window
|
||||
* Added Column.contents_changed which will update the scrollbar so corrently match the contents
|
||||
* Separators expand only in 1 direction now
|
||||
* Added 8 SYMBOLS:
|
||||
SYMBOL_SQUARE = '█'
|
||||
SYMBOL_CIRCLE = '⚫'
|
||||
SYMBOL_CIRCLE_OUTLINE = '◯'
|
||||
SYMBOL_UP = '▲'
|
||||
SYMBOL_RIGHT = '►'
|
||||
SYMBOL_LEFT = '◄'
|
||||
SYMBOL_DOWN = '▼'
|
||||
SYMBOL_X = '❎'
|
||||
* New dark themes - dark grey 8, dark grey 9, dark green 9, dark purple 7
|
||||
* When closing window no longer deletes the tkroot variable and rows but instead set to None
|
||||
* Changd no-titlebar code to use try/except. Previously removed for Mac due to tk 8.6.10 errors calling wm_overrideredirect
|
||||
* Fix for Column/window element justification
|
||||
* New vertical_alignment parm for Column, Frame, pin
|
||||
* New layout helper functions - vtop/vcenter/vbottom - Can pass an element or a row of elements
|
||||
* Fixed statusbar expansion
|
||||
* Added disabled button to theme previewer
|
||||
* Fixed grab anywhere stop motion bug - was setting position to None and causing error changed to event.x
|
||||
* Expanded main to include popup tests, theme tests, ability to hide tabs
|
||||
* Grab parameter for Text Element, Column Element
|
||||
* Added tclversion_detailed to get the detailed tkinter version
|
||||
* All themes changed the progress bar definition that had a "DEFAULT" indicator. New constant DEFAULT_PROGRESS_BAR_COMPUTE indicates the other theme colors should be used to create the progess bar colors.
|
||||
* Added expand_x and expand_y parameters to Columns
|
||||
* Fix for Calendar Button. Still needs to be fixed for read_all_windows
|
||||
* Force focus when no-titlebar window. Needed for Raspberry Pi
|
||||
* Added Window.force_focus
|
||||
* No longer closes the hidden master window. Closing it caused a memory leak within tkinter
|
||||
* Disable close on one_line_progress_meter. There is a cancel button that will close the window
|
||||
* Changed back toplevel to no parent - was causing problems with timeout=0 windows
|
||||
|
||||
### Upcoming
|
||||
|
||||
There will always be overlapping work as the ports will never actually be "complete" as there's always something new that can be built. However there's a definition for the base functionality for PySimpleGUI. This is what is being strived for with the current ports that are underway.
|
||||
|
|
Loading…
Reference in New Issue