Release 4.42.0
This commit is contained in:
parent
03f57c7979
commit
06be391d11
|
@ -1,6 +1,6 @@
|
|||
#!/usr/bin/python3
|
||||
|
||||
version = __version__ = "4.41.2.5 Unreleased\nFix for getting wrong tab number in Tab.update, added bind_return_key to Combo Element, new Sizegrip element, fixed grab_anywhere so that it doesn't grab multiline slider scrollbars input and a few other elements, changed Sizegrip parm to be grip_image which can be a filename or a bytestring, added a white sizegrip image in addition to the default black, improved tearoff menu placement, completed the MenubarCustom code including color settings for the bar and the menus, removed the image from Sizegrip element (now uses the standard Sizegrip built into tkinter), new element method grab_anywhere_exclude to exclude an element from being grabbed"
|
||||
version = __version__ = "4.42.0 Released 23-May-2021"
|
||||
|
||||
__version__ = version.split()[0] # For PEP 396 and PEP 345
|
||||
|
||||
|
@ -473,7 +473,7 @@ TEXT_LOCATION_BOTTOM_RIGHT = tk.SE
|
|||
TEXT_LOCATION_CENTER = tk.CENTER
|
||||
|
||||
|
||||
GRAB_ANYWHERE_IGNORE_THESE_WIDGETS = (ttk.Sizegrip, tk.Scale, ttk.Scrollbar, tk.scrolledtext.ScrolledText, tk.Scrollbar, tk.Entry, tk.Text)
|
||||
GRAB_ANYWHERE_IGNORE_THESE_WIDGETS = (ttk.Sizegrip, tk.Scale, ttk.Scrollbar, tk.scrolledtext.ScrolledText, tk.Scrollbar, tk.Entry, tk.Text, tk.PanedWindow)
|
||||
|
||||
|
||||
# ----====----====----==== Constants the user should NOT f-with ====----====----====----#
|
||||
|
@ -1382,8 +1382,7 @@ class Element():
|
|||
def grab_anywhere_exclude(self):
|
||||
"""
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events
|
||||
instead of the window dragging.
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
"""
|
||||
self.ParentForm._grab_anywhere_ignore_these_list.append(self.Widget)
|
||||
|
||||
|
@ -20069,6 +20068,7 @@ def main_sdk_help():
|
|||
'Input': r'https://pysimplegui.readthedocs.io/en/latest/call%20reference/#input-element',
|
||||
'Listbox': r'https://pysimplegui.readthedocs.io/en/latest/call%20reference/#listbox-element',
|
||||
'Menu': r'https://pysimplegui.readthedocs.io/en/latest/call%20reference/#menu-element',
|
||||
'MenubarCustom': r'https://pysimplegui.readthedocs.io/en/latest/call%20reference/#menubarcustom-element',
|
||||
'Multiline': r'https://pysimplegui.readthedocs.io/en/latest/call%20reference/#multiline-element',
|
||||
'OptionMenu': r'https://pysimplegui.readthedocs.io/en/latest/call%20reference/#optionmenu-element',
|
||||
'Output': r'https://pysimplegui.readthedocs.io/en/latest/call%20reference/#output-element',
|
||||
|
@ -20082,6 +20082,7 @@ def main_sdk_help():
|
|||
'TabGroup': r'https://pysimplegui.readthedocs.io/en/latest/call%20reference/#tabgroup-element',
|
||||
'Table': r'https://pysimplegui.readthedocs.io/en/latest/call%20reference/#table-element',
|
||||
'Text': r'https://pysimplegui.readthedocs.io/en/latest/call%20reference/#text-element',
|
||||
'Titlebar' : r'https://pysimplegui.readthedocs.io/en/latest/call%20reference/#titlebar-element',
|
||||
'Tree': r'https://pysimplegui.readthedocs.io/en/latest/call%20reference/#tree-element',
|
||||
'VerticalSeparator': r'https://pysimplegui.readthedocs.io/en/latest/call%20reference/#verticalseparator-element',
|
||||
'Window': r'https://pysimplegui.readthedocs.io/en/latest/call%20reference/#window',
|
||||
|
@ -20131,6 +20132,9 @@ def main_sdk_help():
|
|||
except Exception as e:
|
||||
pass
|
||||
|
||||
# Add on the pseudo-elements
|
||||
element_names['MenubarCustom'] = MenubarCustom
|
||||
element_names['Titlebar'] = Titlebar
|
||||
|
||||
buttons = [[B(e, pad=(0, 0), size=(22, 1), font='Courier 10')] for e in sorted(element_names.keys())]
|
||||
buttons += [[B('Func Search', pad=(0, 0), size=(22, 1), font='Courier 10')]]
|
||||
|
|
|
@ -174,6 +174,15 @@ Returns the current text shown on a button
|
|||
|---|---|---|
|
||||
|(str)| **return** | The text currently displayed on the button |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -538,6 +547,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -836,6 +854,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -1125,6 +1152,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -1470,6 +1506,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -1718,6 +1763,7 @@ Combo(values,
|
|||
auto_size_text = None,
|
||||
background_color = None,
|
||||
text_color = None,
|
||||
bind_return_key = False,
|
||||
change_submits = False,
|
||||
enable_events = False,
|
||||
disabled = False,
|
||||
|
@ -1742,6 +1788,7 @@ Parameter Descriptions:
|
|||
| bool | auto_size_text | True if element should be the same size as the contents |
|
||||
| str | background_color | color of background |
|
||||
| str | text_color | color of the text |
|
||||
| bool | bind_return_key | If True, then the return key will cause a the Combo to generate an event |
|
||||
| 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 | disabled | set disable state for element |
|
||||
|
@ -1826,6 +1873,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -2174,6 +2230,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -2810,6 +2875,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -3476,6 +3550,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -3725,6 +3808,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -4100,6 +4192,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -4481,6 +4582,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -4853,6 +4963,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -5033,6 +5152,51 @@ Parameter Descriptions:
|
|||
|
||||
---------
|
||||
|
||||
## MenubarCustom Element
|
||||
|
||||
Note that while the MenubarCustom is an element, it is implemented using a function.
|
||||
It is actually a "compound element" that consists of several elements combined into a single Column element.
|
||||
See the Column element to get a list of method calls available. The function returns a Column element.
|
||||
|
||||
A custom Menubar that replaces the OS provided Menubar
|
||||
|
||||
Why?
|
||||
Two reasons - 1. they look great (see custom titlebar) 2. if you have a custom titlebar, then you have to use a custom menubar if you want a menubar
|
||||
|
||||
```
|
||||
MenubarCustom(menu_definition,
|
||||
disabled_text_color = None,
|
||||
bar_font = None,
|
||||
font = None,
|
||||
tearoff = False,
|
||||
pad = None,
|
||||
background_color = None,
|
||||
text_color = None,
|
||||
bar_background_color = None,
|
||||
bar_text_color = None,
|
||||
key = None,
|
||||
k = None)
|
||||
```
|
||||
|
||||
Parameter Descriptions:
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|--|--|--|
|
||||
| List[List[Tuple[str, List[str]]] | menu_definition | The Menu definition specified using lists (docs explain the format) |
|
||||
| str | disabled_text_color | color to use for text when item is disabled. Can be in #RRGGBB format or a color name "black" |
|
||||
| str or Tuple[str, int] | bar_font | specifies the font family, size to be used for the chars in the bar itself |
|
||||
| str or Tuple[str, int] | font | specifies the font family, size to be used for the menu items |
|
||||
| bool | tearoff | if True, then can tear the menu off from the window ans use as a floating window. Very cool effect |
|
||||
| (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)) |
|
||||
| str | background_color | color to use for background of the menus that are displayed after making a section. Can be in #RRGGBB format or a color name "black". Defaults to the color of the bar text |
|
||||
| str | text_color | color to use for the text of the many items in the displayed menus. Can be in #RRGGBB format or a color name "black". Defaults to the bar background |
|
||||
| str | bar_background_color | color to use for the menubar. Can be in #RRGGBB format or a color name "black". Defaults to theme's button text color |
|
||||
| str | bar_text_color | color to use for the menu items text when item is disabled. Can be in #RRGGBB format or a color name "black". Defaults to theme's button background color |
|
||||
| str or int or tuple or object | key | Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window |
|
||||
| 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. |
|
||||
|
||||
---------
|
||||
|
||||
## Multiline Element
|
||||
|
||||
Multiline Element - Display and/or read multiple lines of text. This is both an input and output element.
|
||||
|
@ -5178,6 +5342,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -5602,6 +5775,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -5908,6 +6090,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -6233,6 +6424,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -6495,6 +6695,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -6839,6 +7048,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -7067,6 +7285,215 @@ Parameter Descriptions:
|
|||
|
||||
---------
|
||||
|
||||
## Sizegrip Element
|
||||
|
||||
Sizegrip element will be added to the bottom right corner of your window.
|
||||
It should be placed on the last row of your window along with any other elements on that row.
|
||||
The color will match the theme's background color.
|
||||
|
||||
```
|
||||
Sizegrip(background_color = None)
|
||||
```
|
||||
|
||||
Parameter Descriptions:
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|--|--|--|
|
||||
| str | background_color | color to use for the background of the grip |
|
||||
|
||||
### bind
|
||||
|
||||
Used to add tkinter events to an Element.
|
||||
The tkinter specific data is in the Element's member variable user_bind_event
|
||||
|
||||
```
|
||||
bind(bind_string, key_modifier)
|
||||
```
|
||||
|
||||
Parameter Descriptions:
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|--|--|--|
|
||||
| str | bind_string | The string tkinter expected in its bind function |
|
||||
| str | key_modifier | Additional data to be added to the element's key when event is returned |
|
||||
|
||||
### expand
|
||||
|
||||
Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions
|
||||
|
||||
```
|
||||
expand(expand_x = False,
|
||||
expand_y = False,
|
||||
expand_row = True)
|
||||
```
|
||||
|
||||
Parameter Descriptions:
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|--|--|--|
|
||||
| bool | expand_x | If True Element will expand in the Horizontal directions |
|
||||
| bool | expand_y | If True Element will expand in the Vertical directions |
|
||||
| bool | expand_row | If True the row containing the element will also expand. Without this your element is "trapped" within the row |
|
||||
|
||||
### get_size
|
||||
|
||||
Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method.
|
||||
|
||||
`get_size()`
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
Use this if you must have all space removed when you are hiding an element, including the row container
|
||||
|
||||
```python
|
||||
hide_row()
|
||||
```
|
||||
|
||||
### metadata
|
||||
|
||||
#### property: metadata
|
||||
|
||||
Metadata is an Element property that you can use at any time to hold any value
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|---|---|---|
|
||||
|(Any)| **return** | the current metadata value |
|
||||
|
||||
### set_cursor
|
||||
|
||||
Sets the cursor for the current Element.
|
||||
"Cursor" is used in 2 different ways in this call.
|
||||
For the parameter "cursor" it's actually the mouse pointer.
|
||||
If you do not want any mouse pointer, then use the string "none"
|
||||
For the parameter "cursor_color" it's the color of the beam used when typing into an input element
|
||||
|
||||
```
|
||||
set_cursor(cursor = None, cursor_color = None)
|
||||
```
|
||||
|
||||
Parameter Descriptions:
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|--|--|--|
|
||||
| str | cursor | The tkinter cursor name |
|
||||
| str | cursor_color | color to set the "cursor" to |
|
||||
|
||||
### set_focus
|
||||
|
||||
Sets the current focus to be on this element
|
||||
|
||||
```
|
||||
set_focus(force = False)
|
||||
```
|
||||
|
||||
Parameter Descriptions:
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|--|--|--|
|
||||
| bool | force | if True will call focus_force otherwise calls focus_set |
|
||||
|
||||
### set_size
|
||||
|
||||
Changes the size of an element to a specific size.
|
||||
It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed.
|
||||
|
||||
```
|
||||
set_size(size = (None, None))
|
||||
```
|
||||
|
||||
Parameter Descriptions:
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|--|--|--|
|
||||
| (int, int) | size | The size in characters, rows typically. In some cases they are pixels |
|
||||
|
||||
### set_tooltip
|
||||
|
||||
Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip').
|
||||
|
||||
```
|
||||
set_tooltip(tooltip_text)
|
||||
```
|
||||
|
||||
Parameter Descriptions:
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|--|--|--|
|
||||
| str | tooltip_text | the text to show in tooltip. |
|
||||
|
||||
### set_vscroll_position
|
||||
|
||||
Attempts to set the vertical scroll postition for an element's Widget
|
||||
|
||||
```
|
||||
set_vscroll_position(percent_from_top)
|
||||
```
|
||||
|
||||
Parameter Descriptions:
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|--|--|--|
|
||||
| float | percent_from_top | From 0 to 1.0, the percentage from the top to move scrollbar to |
|
||||
|
||||
### unbind
|
||||
|
||||
Removes a previously bound tkinter event from an Element.
|
||||
|
||||
```
|
||||
unbind(bind_string)
|
||||
```
|
||||
|
||||
Parameter Descriptions:
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|--|--|--|
|
||||
| str | bind_string | The string tkinter expected in its bind function |
|
||||
|
||||
### unhide_row
|
||||
|
||||
Unhides (makes visible again) the row container that the Element is located on.
|
||||
Note that it will re-appear at the bottom of the window / container, most likely.
|
||||
|
||||
```python
|
||||
unhide_row()
|
||||
```
|
||||
|
||||
### update
|
||||
|
||||
A dummy update call. This will only be called if an element hasn't implemented an update method
|
||||
It is provided here for docstring purposes. If you got here by browing code via PyCharm, know
|
||||
that this is not the function that will be called. Your actual element's update method will be called
|
||||
|
||||
```
|
||||
update(args=*<1 or N object>, kwargs)
|
||||
```
|
||||
|
||||
### visible
|
||||
|
||||
#### property: visible
|
||||
|
||||
Returns visibility state for the element. This is a READONLY property
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|---|---|---|
|
||||
|(bool)| **return** | Visibility state for element |
|
||||
|
||||
---------
|
||||
|
||||
## Slider Element
|
||||
|
||||
A slider, horizontal or vertical
|
||||
|
@ -7186,6 +7613,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -7497,6 +7933,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -7818,6 +8263,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -8130,6 +8584,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -8515,6 +8978,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -8859,6 +9331,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -9175,6 +9656,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -9424,6 +9914,8 @@ Parameter Descriptions:
|
|||
| str or int or tuple or object or None | k | Exactly the same as key. Choose one of them to use |
|
||||
| Column | **RETURN** | A single Column element that has eveything in 1 element
|
||||
|
||||
---------
|
||||
|
||||
## Tree Element
|
||||
|
||||
Tree Element - Presents data in a tree-like manner, much like a file/folder browser. Uses the TreeData class
|
||||
|
@ -9570,6 +10062,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -9919,6 +10420,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
|
|
@ -8707,7 +8707,32 @@ Fixed Syntax error in Text.update
|
|||
* tkinter version
|
||||
* PySimpleGUI version
|
||||
* PySimpleGUI filename with full path
|
||||
|
||||
|
||||
## 4.42.0 PySimpleGUI 23-May-2021
|
||||
|
||||
New Sizegrip Element
|
||||
New MenubarCustom pseudo-Element
|
||||
Grab Anywhere feature improved
|
||||
|
||||
* New Sizegrip element
|
||||
* Needed in order to resize windows that doesn't have a titlebar
|
||||
* Place as the last element on the last row of your layout
|
||||
* New MenubarCustom Element
|
||||
* Needed when using a custom Titlebar
|
||||
* Provides the ability to have a window that is entirely themed
|
||||
* Without it, was not possible to have a custom Titlebar with a menubar
|
||||
* Works like the traditional Menu Element (the item chosen is returned as the event)
|
||||
* Added new elements to the SDK Reference built into PySimpleGUI and in the call reference documentation online
|
||||
* Grab Anywhere
|
||||
* Finally got the appropriate elements and widgets excluded! Yeah!
|
||||
* Now Multiline, Input, Slider, Pane, Sizegrip, active scrollbars will not move the window
|
||||
* Additionally, a new method Element.grab_anywhere_exclude() will exclude your element from being grabbed
|
||||
* Useful for Graph elements
|
||||
* Sometimes you'll have a window with graphs that you can to be able to move using Graph element
|
||||
* Other times, you are using your Graph element with drag option set. In this case, you will want to exclude it.
|
||||
* Improved torn-off menu placement. Now places them at the window's location
|
||||
* Combo element new bind_return_key parameter - if set, when return key is pressed and element is focused, then event will be generated. Works like the Listbox's bind_return_key
|
||||
* Fix for changing the title of a Tab using
|
||||
|
||||
## Upcoming
|
||||
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
C:\Python\Anaconda3\python.exe C:/Users/mike/AppData/Roaming/JetBrains/PyCharmCE2020.3/scratches/scratch_1152.py
|
||||
Go {'-IN-': 'C:\\Python\\PycharmProjects\\PSG\\DemoPrograms\\screenshots', 'Browse': ''}
|
||||
![https://github.com/PySimpleGUI/PySimpleGUI/blob/master/DemoPrograms/Demo_All_Widgets.py](https://raw.githubusercontent.com/Chr0nicT/PySimpleGUI/master/DemoPrograms/Markdown_Project/Demo_All_Widgets.png)
|
||||
![https://github.com/PySimpleGUI/PySimpleGUI/blob/master/DemoPrograms/Demo_Animated_GIFs.py](https://raw.githubusercontent.com/Chr0nicT/PySimpleGUI/master/DemoPrograms/Markdown_Project/Demo_Animated_GIFs.png)
|
||||
![https://github.com/PySimpleGUI/PySimpleGUI/blob/master/DemoPrograms/Demo_Bar_Chart.py](https://raw.githubusercontent.com/Chr0nicT/PySimpleGUI/master/DemoPrograms/Markdown_Project/Demo_Bar_Chart.png)
|
||||
|
|
|
@ -1912,7 +1912,34 @@ Fixed Syntax error in Text.update
|
|||
* tkinter version
|
||||
* PySimpleGUI version
|
||||
* PySimpleGUI filename with full path
|
||||
|
||||
|
||||
|
||||
## 4.42.0 PySimpleGUI 23-May-2021
|
||||
|
||||
New Sizegrip Element
|
||||
New MenubarCustom pseudo-Element
|
||||
Grab Anywhere feature improved
|
||||
|
||||
* New Sizegrip element
|
||||
* Needed in order to resize windows that doesn't have a titlebar
|
||||
* Place as the last element on the last row of your layout
|
||||
* New MenubarCustom Element
|
||||
* Needed when using a custom Titlebar
|
||||
* Provides the ability to have a window that is entirely themed
|
||||
* Without it, was not possible to have a custom Titlebar with a menubar
|
||||
* Works like the traditional Menu Element (the item chosen is returned as the event)
|
||||
* Added new elements to the SDK Reference built into PySimpleGUI and in the call reference documentation online
|
||||
* Grab Anywhere
|
||||
* Finally got the appropriate elements and widgets excluded! Yeah!
|
||||
* Now Multiline, Input, Slider, Pane, Sizegrip, active scrollbars will not move the window
|
||||
* Additionally, a new method Element.grab_anywhere_exclude() will exclude your element from being grabbed
|
||||
* Useful for Graph elements
|
||||
* Sometimes you'll have a window with graphs that you can to be able to move using Graph element
|
||||
* Other times, you are using your Graph element with drag option set. In this case, you will want to exclude it.
|
||||
* Improved torn-off menu placement. Now places them at the window's location
|
||||
* Combo element new bind_return_key parameter - if set, when return key is pressed and element is focused, then event will be generated. Works like the Listbox's bind_return_key
|
||||
* Fix for changing the title of a Tab using
|
||||
|
||||
|
||||
## Upcoming
|
||||
|
||||
|
|
|
@ -41,6 +41,9 @@ Here are all of the Elements, the Window & SystemTray classes, and all functions
|
|||
### get_text
|
||||
<!-- <+Button.get_text+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+Button.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+Button.hide_row+> -->
|
||||
|
||||
|
@ -114,6 +117,9 @@ The following methods are here for backwards compatibility reference. You will
|
|||
### get_size
|
||||
<!-- <+ButtonMenu.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+ButtonMenu.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+ButtonMenu.hide_row+> -->
|
||||
|
||||
|
@ -185,6 +191,9 @@ The following methods are here for backwards compatibility reference. You will
|
|||
### get_size
|
||||
<!-- <+Canvas.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+Canvas.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+Canvas.hide_row+> -->
|
||||
|
||||
|
@ -252,6 +261,9 @@ The following methods are here for backwards compatibility reference. You will
|
|||
### get_size
|
||||
<!-- <+Checkbox.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+Checkbox.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+Checkbox.hide_row+> -->
|
||||
|
||||
|
@ -326,6 +338,9 @@ The following methods are here for backwards compatibility reference. You will
|
|||
### get_size
|
||||
<!-- <+Column.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+Column.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+Column.hide_row+> -->
|
||||
|
||||
|
@ -408,6 +423,9 @@ The following methods are here for backwards compatibility reference. You will
|
|||
### get_size
|
||||
<!-- <+Combo.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+Combo.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+Combo.hide_row+> -->
|
||||
|
||||
|
@ -480,6 +498,9 @@ The following methods are here for backwards compatibility reference. You will
|
|||
### get_size
|
||||
<!-- <+Frame.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+Frame.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+Frame.hide_row+> -->
|
||||
|
||||
|
@ -602,6 +623,9 @@ The following methods are here for backwards compatibility reference. You will
|
|||
### get_size
|
||||
<!-- <+Graph.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+Graph.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+Graph.hide_row+> -->
|
||||
|
||||
|
@ -737,6 +761,9 @@ The following methods are here for backwards compatibility reference. You will
|
|||
### get_size
|
||||
<!-- <+HorizontalSeparator.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+HorizontalSeparator.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+HorizontalSeparator.hide_row+> -->
|
||||
|
||||
|
@ -797,6 +824,9 @@ The following methods are here for backwards compatibility reference. You will
|
|||
### get_size
|
||||
<!-- <+Image.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+Image.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+Image.hide_row+> -->
|
||||
|
||||
|
@ -875,6 +905,9 @@ The following methods are here for backwards compatibility reference. You will
|
|||
### get_size
|
||||
<!-- <+Input.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+Input.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+Input.hide_row+> -->
|
||||
|
||||
|
@ -956,6 +989,9 @@ The following methods are here for backwards compatibility reference. You will
|
|||
### get_size
|
||||
<!-- <+Listbox.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+Listbox.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+Listbox.hide_row+> -->
|
||||
|
||||
|
@ -1036,6 +1072,9 @@ The following methods are here for backwards compatibility reference. You will
|
|||
### get_size
|
||||
<!-- <+Menu.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+Menu.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+Menu.hide_row+> -->
|
||||
|
||||
|
@ -1086,6 +1125,17 @@ The following methods are here for backwards compatibility reference. You will
|
|||
---------
|
||||
|
||||
|
||||
## MenubarCustom Element
|
||||
|
||||
Note that while the MenubarCustom is an element, it is implemented using a function.
|
||||
It is actually a "compound element" that consists of several elements combined into a single Column element.
|
||||
See the Column element to get a list of method calls available. The function returns a Column element.
|
||||
|
||||
<!-- <+func.MenubarCustom+> -->
|
||||
|
||||
|
||||
---------
|
||||
|
||||
## Multiline Element
|
||||
<!-- <+Multiline.doc+> -->
|
||||
<!-- <+Multiline.__init__+> -->
|
||||
|
@ -1105,6 +1155,9 @@ The following methods are here for backwards compatibility reference. You will
|
|||
### get_size
|
||||
<!-- <+Multiline.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+Multiline.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+Multiline.hide_row+> -->
|
||||
|
||||
|
@ -1193,6 +1246,9 @@ The following methods are here for backwards compatibility reference. You will
|
|||
### get_size
|
||||
<!-- <+OptionMenu.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+OptionMenu.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+OptionMenu.hide_row+> -->
|
||||
|
||||
|
@ -1263,6 +1319,9 @@ The following methods are here for backwards compatibility reference. You will
|
|||
### get_size
|
||||
<!-- <+Output.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+Output.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+Output.hide_row+> -->
|
||||
|
||||
|
@ -1342,6 +1401,9 @@ The following methods are here for backwards compatibility reference. You will
|
|||
### get_size
|
||||
<!-- <+Pane.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+Pane.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+Pane.hide_row+> -->
|
||||
|
||||
|
@ -1407,6 +1469,9 @@ The following methods are here for backwards compatibility reference. You will
|
|||
### get_size
|
||||
<!-- <+ProgressBar.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+ProgressBar.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+ProgressBar.hide_row+> -->
|
||||
|
||||
|
@ -1483,6 +1548,9 @@ The following methods are here for backwards compatibility reference. You will
|
|||
### get_size
|
||||
<!-- <+Radio.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+Radio.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+Radio.hide_row+> -->
|
||||
|
||||
|
@ -1543,6 +1611,59 @@ The following methods are here for backwards compatibility reference. You will
|
|||
---------
|
||||
|
||||
|
||||
## Sizegrip Element
|
||||
<!-- <+Sizegrip.doc+> -->
|
||||
<!-- <+Sizegrip.__init__+> -->
|
||||
|
||||
### bind
|
||||
<!-- <+Sizegrip.bind+> -->
|
||||
|
||||
### expand
|
||||
<!-- <+Sizegrip.expand+> -->
|
||||
|
||||
### get_size
|
||||
<!-- <+Sizegrip.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+Sizegrip.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+Sizegrip.hide_row+> -->
|
||||
|
||||
### metadata
|
||||
<!-- <+Sizegrip.metadata+> -->
|
||||
|
||||
### set_cursor
|
||||
<!-- <+Sizegrip.set_cursor+> -->
|
||||
|
||||
### set_focus
|
||||
<!-- <+Sizegrip.set_focus+> -->
|
||||
|
||||
### set_size
|
||||
<!-- <+Sizegrip.set_size+> -->
|
||||
|
||||
### set_tooltip
|
||||
<!-- <+Sizegrip.set_tooltip+> -->
|
||||
|
||||
### set_vscroll_position
|
||||
<!-- <+Sizegrip.set_vscroll_position+> -->
|
||||
|
||||
### unbind
|
||||
<!-- <+Sizegrip.unbind+> -->
|
||||
|
||||
### unhide_row
|
||||
<!-- <+Sizegrip.unhide_row+> -->
|
||||
|
||||
### update
|
||||
<!-- <+Sizegrip.update+> -->
|
||||
|
||||
### visible
|
||||
<!-- <+Sizegrip.visible+> -->
|
||||
|
||||
|
||||
---------
|
||||
|
||||
|
||||
## Slider Element
|
||||
<!-- <+Slider.doc+> -->
|
||||
<!-- <+Slider.__init__+> -->
|
||||
|
@ -1559,6 +1680,9 @@ The following methods are here for backwards compatibility reference. You will
|
|||
### get_size
|
||||
<!-- <+Slider.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+Slider.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+Slider.hide_row+> -->
|
||||
|
||||
|
@ -1628,6 +1752,9 @@ The following methods are here for backwards compatibility reference. You will
|
|||
### get_size
|
||||
<!-- <+Spin.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+Spin.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+Spin.hide_row+> -->
|
||||
|
||||
|
@ -1696,6 +1823,9 @@ The following methods are here for backwards compatibility reference. You will
|
|||
### get_size
|
||||
<!-- <+StatusBar.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+StatusBar.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+StatusBar.hide_row+> -->
|
||||
|
||||
|
@ -1765,6 +1895,9 @@ The following methods are here for backwards compatibility reference. You will
|
|||
### get_size
|
||||
<!-- <+Tab.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+Tab.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+Tab.hide_row+> -->
|
||||
|
||||
|
@ -1853,6 +1986,9 @@ The following methods are here for backwards compatibility reference. You will
|
|||
### get_size
|
||||
<!-- <+TabGroup.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+TabGroup.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+TabGroup.hide_row+> -->
|
||||
|
||||
|
@ -1926,6 +2062,9 @@ The following methods are here for backwards compatibility reference. You will
|
|||
### get_size
|
||||
<!-- <+Table.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+Table.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+Table.hide_row+> -->
|
||||
|
||||
|
@ -1994,6 +2133,9 @@ The following methods are here for backwards compatibility reference. You will
|
|||
### get_size
|
||||
<!-- <+Text.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+Text.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+Text.hide_row+> -->
|
||||
|
||||
|
@ -2055,6 +2197,7 @@ See the Column element to get a list of method calls available. The function re
|
|||
|
||||
<!-- <+func.Titlebar+> -->
|
||||
|
||||
---------
|
||||
|
||||
## Tree Element
|
||||
<!-- <+Tree.doc+> -->
|
||||
|
@ -2075,6 +2218,9 @@ See the Column element to get a list of method calls available. The function re
|
|||
### get_size
|
||||
<!-- <+Tree.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+Tree.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+Tree.hide_row+> -->
|
||||
|
||||
|
@ -2159,6 +2305,9 @@ The following methods are here for backwards compatibility reference. You will
|
|||
### get_size
|
||||
<!-- <+VerticalSeparator.get_size+> -->
|
||||
|
||||
### grab_anywhere_exclude
|
||||
<!-- <+VerticalSeparator.grab_anywhere_exclude+> -->
|
||||
|
||||
### hide_row
|
||||
<!-- <+VerticalSeparator.hide_row+> -->
|
||||
|
||||
|
|
|
@ -174,6 +174,15 @@ Returns the current text shown on a button
|
|||
|---|---|---|
|
||||
|(str)| **return** | The text currently displayed on the button |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -538,6 +547,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -836,6 +854,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -1125,6 +1152,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -1470,6 +1506,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -1718,6 +1763,7 @@ Combo(values,
|
|||
auto_size_text = None,
|
||||
background_color = None,
|
||||
text_color = None,
|
||||
bind_return_key = False,
|
||||
change_submits = False,
|
||||
enable_events = False,
|
||||
disabled = False,
|
||||
|
@ -1742,6 +1788,7 @@ Parameter Descriptions:
|
|||
| bool | auto_size_text | True if element should be the same size as the contents |
|
||||
| str | background_color | color of background |
|
||||
| str | text_color | color of the text |
|
||||
| bool | bind_return_key | If True, then the return key will cause a the Combo to generate an event |
|
||||
| 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 | disabled | set disable state for element |
|
||||
|
@ -1826,6 +1873,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -2174,6 +2230,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -2810,6 +2875,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -3476,6 +3550,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -3725,6 +3808,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -4100,6 +4192,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -4481,6 +4582,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -4853,6 +4963,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -5033,6 +5152,51 @@ Parameter Descriptions:
|
|||
|
||||
---------
|
||||
|
||||
## MenubarCustom Element
|
||||
|
||||
Note that while the MenubarCustom is an element, it is implemented using a function.
|
||||
It is actually a "compound element" that consists of several elements combined into a single Column element.
|
||||
See the Column element to get a list of method calls available. The function returns a Column element.
|
||||
|
||||
A custom Menubar that replaces the OS provided Menubar
|
||||
|
||||
Why?
|
||||
Two reasons - 1. they look great (see custom titlebar) 2. if you have a custom titlebar, then you have to use a custom menubar if you want a menubar
|
||||
|
||||
```
|
||||
MenubarCustom(menu_definition,
|
||||
disabled_text_color = None,
|
||||
bar_font = None,
|
||||
font = None,
|
||||
tearoff = False,
|
||||
pad = None,
|
||||
background_color = None,
|
||||
text_color = None,
|
||||
bar_background_color = None,
|
||||
bar_text_color = None,
|
||||
key = None,
|
||||
k = None)
|
||||
```
|
||||
|
||||
Parameter Descriptions:
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|--|--|--|
|
||||
| List[List[Tuple[str, List[str]]] | menu_definition | The Menu definition specified using lists (docs explain the format) |
|
||||
| str | disabled_text_color | color to use for text when item is disabled. Can be in #RRGGBB format or a color name "black" |
|
||||
| str or Tuple[str, int] | bar_font | specifies the font family, size to be used for the chars in the bar itself |
|
||||
| str or Tuple[str, int] | font | specifies the font family, size to be used for the menu items |
|
||||
| bool | tearoff | if True, then can tear the menu off from the window ans use as a floating window. Very cool effect |
|
||||
| (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)) |
|
||||
| str | background_color | color to use for background of the menus that are displayed after making a section. Can be in #RRGGBB format or a color name "black". Defaults to the color of the bar text |
|
||||
| str | text_color | color to use for the text of the many items in the displayed menus. Can be in #RRGGBB format or a color name "black". Defaults to the bar background |
|
||||
| str | bar_background_color | color to use for the menubar. Can be in #RRGGBB format or a color name "black". Defaults to theme's button text color |
|
||||
| str | bar_text_color | color to use for the menu items text when item is disabled. Can be in #RRGGBB format or a color name "black". Defaults to theme's button background color |
|
||||
| str or int or tuple or object | key | Value that uniquely identifies this element from all other elements. Used when Finding an element or in return values. Must be unique to the window |
|
||||
| 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. |
|
||||
|
||||
---------
|
||||
|
||||
## Multiline Element
|
||||
|
||||
Multiline Element - Display and/or read multiple lines of text. This is both an input and output element.
|
||||
|
@ -5178,6 +5342,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -5602,6 +5775,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -5908,6 +6090,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -6233,6 +6424,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -6495,6 +6695,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -6839,6 +7048,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -7067,6 +7285,215 @@ Parameter Descriptions:
|
|||
|
||||
---------
|
||||
|
||||
## Sizegrip Element
|
||||
|
||||
Sizegrip element will be added to the bottom right corner of your window.
|
||||
It should be placed on the last row of your window along with any other elements on that row.
|
||||
The color will match the theme's background color.
|
||||
|
||||
```
|
||||
Sizegrip(background_color = None)
|
||||
```
|
||||
|
||||
Parameter Descriptions:
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|--|--|--|
|
||||
| str | background_color | color to use for the background of the grip |
|
||||
|
||||
### bind
|
||||
|
||||
Used to add tkinter events to an Element.
|
||||
The tkinter specific data is in the Element's member variable user_bind_event
|
||||
|
||||
```
|
||||
bind(bind_string, key_modifier)
|
||||
```
|
||||
|
||||
Parameter Descriptions:
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|--|--|--|
|
||||
| str | bind_string | The string tkinter expected in its bind function |
|
||||
| str | key_modifier | Additional data to be added to the element's key when event is returned |
|
||||
|
||||
### expand
|
||||
|
||||
Causes the Element to expand to fill available space in the X and Y directions. Can specify which or both directions
|
||||
|
||||
```
|
||||
expand(expand_x = False,
|
||||
expand_y = False,
|
||||
expand_row = True)
|
||||
```
|
||||
|
||||
Parameter Descriptions:
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|--|--|--|
|
||||
| bool | expand_x | If True Element will expand in the Horizontal directions |
|
||||
| bool | expand_y | If True Element will expand in the Vertical directions |
|
||||
| bool | expand_row | If True the row containing the element will also expand. Without this your element is "trapped" within the row |
|
||||
|
||||
### get_size
|
||||
|
||||
Return the size of an element in Pixels. Care must be taken as some elements use characters to specify their size but will return pixels when calling this get_size method.
|
||||
|
||||
`get_size()`
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
Use this if you must have all space removed when you are hiding an element, including the row container
|
||||
|
||||
```python
|
||||
hide_row()
|
||||
```
|
||||
|
||||
### metadata
|
||||
|
||||
#### property: metadata
|
||||
|
||||
Metadata is an Element property that you can use at any time to hold any value
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|---|---|---|
|
||||
|(Any)| **return** | the current metadata value |
|
||||
|
||||
### set_cursor
|
||||
|
||||
Sets the cursor for the current Element.
|
||||
"Cursor" is used in 2 different ways in this call.
|
||||
For the parameter "cursor" it's actually the mouse pointer.
|
||||
If you do not want any mouse pointer, then use the string "none"
|
||||
For the parameter "cursor_color" it's the color of the beam used when typing into an input element
|
||||
|
||||
```
|
||||
set_cursor(cursor = None, cursor_color = None)
|
||||
```
|
||||
|
||||
Parameter Descriptions:
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|--|--|--|
|
||||
| str | cursor | The tkinter cursor name |
|
||||
| str | cursor_color | color to set the "cursor" to |
|
||||
|
||||
### set_focus
|
||||
|
||||
Sets the current focus to be on this element
|
||||
|
||||
```
|
||||
set_focus(force = False)
|
||||
```
|
||||
|
||||
Parameter Descriptions:
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|--|--|--|
|
||||
| bool | force | if True will call focus_force otherwise calls focus_set |
|
||||
|
||||
### set_size
|
||||
|
||||
Changes the size of an element to a specific size.
|
||||
It's possible to specify None for one of sizes so that only 1 of the element's dimensions are changed.
|
||||
|
||||
```
|
||||
set_size(size = (None, None))
|
||||
```
|
||||
|
||||
Parameter Descriptions:
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|--|--|--|
|
||||
| (int, int) | size | The size in characters, rows typically. In some cases they are pixels |
|
||||
|
||||
### set_tooltip
|
||||
|
||||
Called by application to change the tooltip text for an Element. Normally invoked using the Element Object such as: window.Element('key').SetToolTip('New tip').
|
||||
|
||||
```
|
||||
set_tooltip(tooltip_text)
|
||||
```
|
||||
|
||||
Parameter Descriptions:
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|--|--|--|
|
||||
| str | tooltip_text | the text to show in tooltip. |
|
||||
|
||||
### set_vscroll_position
|
||||
|
||||
Attempts to set the vertical scroll postition for an element's Widget
|
||||
|
||||
```
|
||||
set_vscroll_position(percent_from_top)
|
||||
```
|
||||
|
||||
Parameter Descriptions:
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|--|--|--|
|
||||
| float | percent_from_top | From 0 to 1.0, the percentage from the top to move scrollbar to |
|
||||
|
||||
### unbind
|
||||
|
||||
Removes a previously bound tkinter event from an Element.
|
||||
|
||||
```
|
||||
unbind(bind_string)
|
||||
```
|
||||
|
||||
Parameter Descriptions:
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|--|--|--|
|
||||
| str | bind_string | The string tkinter expected in its bind function |
|
||||
|
||||
### unhide_row
|
||||
|
||||
Unhides (makes visible again) the row container that the Element is located on.
|
||||
Note that it will re-appear at the bottom of the window / container, most likely.
|
||||
|
||||
```python
|
||||
unhide_row()
|
||||
```
|
||||
|
||||
### update
|
||||
|
||||
A dummy update call. This will only be called if an element hasn't implemented an update method
|
||||
It is provided here for docstring purposes. If you got here by browing code via PyCharm, know
|
||||
that this is not the function that will be called. Your actual element's update method will be called
|
||||
|
||||
```
|
||||
update(args=*<1 or N object>, kwargs)
|
||||
```
|
||||
|
||||
### visible
|
||||
|
||||
#### property: visible
|
||||
|
||||
Returns visibility state for the element. This is a READONLY property
|
||||
|
||||
|Type|Name|Meaning|
|
||||
|---|---|---|
|
||||
|(bool)| **return** | Visibility state for element |
|
||||
|
||||
---------
|
||||
|
||||
## Slider Element
|
||||
|
||||
A slider, horizontal or vertical
|
||||
|
@ -7186,6 +7613,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -7497,6 +7933,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -7818,6 +8263,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -8130,6 +8584,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -8515,6 +8978,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -8859,6 +9331,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -9175,6 +9656,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -9424,6 +9914,8 @@ Parameter Descriptions:
|
|||
| str or int or tuple or object or None | k | Exactly the same as key. Choose one of them to use |
|
||||
| Column | **RETURN** | A single Column element that has eveything in 1 element
|
||||
|
||||
---------
|
||||
|
||||
## Tree Element
|
||||
|
||||
Tree Element - Presents data in a tree-like manner, much like a file/folder browser. Uses the TreeData class
|
||||
|
@ -9570,6 +10062,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
@ -9919,6 +10420,15 @@ Return the size of an element in Pixels. Care must be taken as some elements us
|
|||
|---|---|---|
|
||||
|Tuple[int, int]| **return** | width and height of the element |
|
||||
|
||||
### grab_anywhere_exclude
|
||||
|
||||
Excludes this element from being used by the grab_anywhere feature
|
||||
Handy for elements like a Graph element when dragging is enabled. You want the Graph element to get the drag events instead of the window dragging.
|
||||
|
||||
```python
|
||||
grab_anywhere_exclude()
|
||||
```
|
||||
|
||||
### hide_row
|
||||
|
||||
Hide the entire row an Element is located on.
|
||||
|
|
|
@ -1,5 +1,3 @@
|
|||
C:\Python\Anaconda3\python.exe C:/Users/mike/AppData/Roaming/JetBrains/PyCharmCE2020.3/scratches/scratch_1152.py
|
||||
Go {'-IN-': 'C:\\Python\\PycharmProjects\\PSG\\DemoPrograms\\screenshots', 'Browse': ''}
|
||||
![https://github.com/PySimpleGUI/PySimpleGUI/blob/master/DemoPrograms/Demo_All_Widgets.py](https://raw.githubusercontent.com/Chr0nicT/PySimpleGUI/master/DemoPrograms/Markdown_Project/Demo_All_Widgets.png)
|
||||
![https://github.com/PySimpleGUI/PySimpleGUI/blob/master/DemoPrograms/Demo_Animated_GIFs.py](https://raw.githubusercontent.com/Chr0nicT/PySimpleGUI/master/DemoPrograms/Markdown_Project/Demo_Animated_GIFs.png)
|
||||
![https://github.com/PySimpleGUI/PySimpleGUI/blob/master/DemoPrograms/Demo_Bar_Chart.py](https://raw.githubusercontent.com/Chr0nicT/PySimpleGUI/master/DemoPrograms/Markdown_Project/Demo_Bar_Chart.png)
|
||||
|
|
|
@ -8707,7 +8707,32 @@ Fixed Syntax error in Text.update
|
|||
* tkinter version
|
||||
* PySimpleGUI version
|
||||
* PySimpleGUI filename with full path
|
||||
|
||||
|
||||
## 4.42.0 PySimpleGUI 23-May-2021
|
||||
|
||||
New Sizegrip Element
|
||||
New MenubarCustom pseudo-Element
|
||||
Grab Anywhere feature improved
|
||||
|
||||
* New Sizegrip element
|
||||
* Needed in order to resize windows that doesn't have a titlebar
|
||||
* Place as the last element on the last row of your layout
|
||||
* New MenubarCustom Element
|
||||
* Needed when using a custom Titlebar
|
||||
* Provides the ability to have a window that is entirely themed
|
||||
* Without it, was not possible to have a custom Titlebar with a menubar
|
||||
* Works like the traditional Menu Element (the item chosen is returned as the event)
|
||||
* Added new elements to the SDK Reference built into PySimpleGUI and in the call reference documentation online
|
||||
* Grab Anywhere
|
||||
* Finally got the appropriate elements and widgets excluded! Yeah!
|
||||
* Now Multiline, Input, Slider, Pane, Sizegrip, active scrollbars will not move the window
|
||||
* Additionally, a new method Element.grab_anywhere_exclude() will exclude your element from being grabbed
|
||||
* Useful for Graph elements
|
||||
* Sometimes you'll have a window with graphs that you can to be able to move using Graph element
|
||||
* Other times, you are using your Graph element with drag option set. In this case, you will want to exclude it.
|
||||
* Improved torn-off menu placement. Now places them at the window's location
|
||||
* Combo element new bind_return_key parameter - if set, when return key is pressed and element is focused, then event will be generated. Works like the Listbox's bind_return_key
|
||||
* Fix for changing the title of a Tab using
|
||||
|
||||
## Upcoming
|
||||
|
||||
|
|
Loading…
Reference in New Issue