A bunch of new element shortcuts (experimental) PBar, Prog, Col, DD, OM, LBox, R, Rad, SpinBox, Spinner, Status, Out, BMenu
This commit is contained in:
parent
5183dc0175
commit
5741b36783
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/python3
|
#!/usr/bin/python3
|
||||||
version = __version__ = "4.4.0.7 Unreleased Scrollable Columns, ML, window()"
|
version = __version__ = "4.4.0.8 Unreleased Scrollable Columns, ML, window()"
|
||||||
|
|
||||||
|
|
||||||
# 888888ba .d88888b oo dP .88888. dP dP dP
|
# 888888ba .d88888b oo dP .88888. dP dP dP
|
||||||
|
@ -986,7 +986,7 @@ class Combo(Element):
|
||||||
InputCombo = Combo
|
InputCombo = Combo
|
||||||
DropDown = InputCombo
|
DropDown = InputCombo
|
||||||
Drop = InputCombo
|
Drop = InputCombo
|
||||||
|
DD = Combo
|
||||||
|
|
||||||
# ---------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------- #
|
||||||
# Option Menu #
|
# Option Menu #
|
||||||
|
@ -1070,7 +1070,7 @@ class OptionMenu(Element):
|
||||||
|
|
||||||
# ------------------------- OPTION MENU Element lazy functions ------------------------- #
|
# ------------------------- OPTION MENU Element lazy functions ------------------------- #
|
||||||
InputOptionMenu = OptionMenu
|
InputOptionMenu = OptionMenu
|
||||||
|
OM = OptionMenu
|
||||||
|
|
||||||
# ---------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------- #
|
||||||
# Listbox #
|
# Listbox #
|
||||||
|
@ -1227,6 +1227,9 @@ class Listbox(Element):
|
||||||
update = Update
|
update = Update
|
||||||
|
|
||||||
|
|
||||||
|
LBox = Listbox
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------- #
|
||||||
# Radio #
|
# Radio #
|
||||||
# ---------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------- #
|
||||||
|
@ -1318,6 +1321,10 @@ class Radio(Element):
|
||||||
set_tooltip = Element.SetTooltip
|
set_tooltip = Element.SetTooltip
|
||||||
update = Update
|
update = Update
|
||||||
|
|
||||||
|
R = Radio
|
||||||
|
Rad = Radio
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------- #
|
||||||
# Checkbox #
|
# Checkbox #
|
||||||
|
@ -1330,7 +1337,6 @@ class Checkbox(Element):
|
||||||
text_color=None, change_submits=False, enable_events=False, disabled=False, key=None, pad=None,
|
text_color=None, change_submits=False, enable_events=False, disabled=False, key=None, pad=None,
|
||||||
tooltip=None, visible=True):
|
tooltip=None, visible=True):
|
||||||
"""
|
"""
|
||||||
|
|
||||||
:param text: (str) Text to display next to checkbox
|
:param text: (str) Text to display next to checkbox
|
||||||
:param default: (bool). Set to True if you want this checkbox initially checked
|
:param default: (bool). Set to True if you want this checkbox initially checked
|
||||||
:param size: Tuple[int, int] (width, height) width = characters-wide, height = rows-high
|
:param size: Tuple[int, int] (width, height) width = characters-wide, height = rows-high
|
||||||
|
@ -1513,6 +1519,10 @@ class Spin(Element):
|
||||||
set_tooltip = Element.SetTooltip
|
set_tooltip = Element.SetTooltip
|
||||||
update = Update
|
update = Update
|
||||||
|
|
||||||
|
SpinBox = Spin
|
||||||
|
Spinner = Spin
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------- #
|
||||||
# Multiline #
|
# Multiline #
|
||||||
# ---------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------- #
|
||||||
|
@ -1716,7 +1726,7 @@ class Text(Element):
|
||||||
|
|
||||||
# ------------------------- Text Element lazy functions ------------------------- #
|
# ------------------------- Text Element lazy functions ------------------------- #
|
||||||
|
|
||||||
Txt = Text # type: Text.__init__
|
Txt = Text # type: Text
|
||||||
T = Text # type: Text
|
T = Text # type: Text
|
||||||
|
|
||||||
|
|
||||||
|
@ -1796,6 +1806,9 @@ class StatusBar(Element):
|
||||||
set_tooltip = Element.SetTooltip
|
set_tooltip = Element.SetTooltip
|
||||||
update = Update
|
update = Update
|
||||||
|
|
||||||
|
Status = StatusBar
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------- #
|
||||||
# TKProgressBar #
|
# TKProgressBar #
|
||||||
# Emulate the TK ProgressBar using canvas and rectangles
|
# Emulate the TK ProgressBar using canvas and rectangles
|
||||||
|
@ -2021,6 +2034,8 @@ class Output(Element):
|
||||||
tk_out = TKOut
|
tk_out = TKOut
|
||||||
update = Update
|
update = Update
|
||||||
|
|
||||||
|
Out = Output
|
||||||
|
|
||||||
# ---------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------- #
|
||||||
# Button Class #
|
# Button Class #
|
||||||
# ---------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------- #
|
||||||
|
@ -2028,7 +2043,6 @@ class Button(Element):
|
||||||
"""
|
"""
|
||||||
Button Element - Defines all possible buttons. The shortcuts such as Submit, FileBrowse, ... each create a Button
|
Button Element - Defines all possible buttons. The shortcuts such as Submit, FileBrowse, ... each create a Button
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def __init__(self, button_text='', button_type=BUTTON_TYPE_READ_FORM, target=(None, None), tooltip=None,
|
def __init__(self, button_text='', button_type=BUTTON_TYPE_READ_FORM, target=(None, None), tooltip=None,
|
||||||
file_types=(("ALL Files", "*.*"),), initial_folder=None, disabled=False, change_submits=False,
|
file_types=(("ALL Files", "*.*"),), initial_folder=None, disabled=False, change_submits=False,
|
||||||
enable_events=False, image_filename=None, image_data=None, image_size=(None, None),
|
enable_events=False, image_filename=None, image_data=None, image_size=(None, None),
|
||||||
|
@ -2454,6 +2468,7 @@ class ButtonMenu(Element):
|
||||||
set_tooltip = Element.SetTooltip
|
set_tooltip = Element.SetTooltip
|
||||||
update = Update
|
update = Update
|
||||||
|
|
||||||
|
BMenu = ButtonMenu
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------- #
|
||||||
|
@ -2532,6 +2547,10 @@ class ProgressBar(Element):
|
||||||
update = Update
|
update = Update
|
||||||
update_bar = UpdateBar
|
update_bar = UpdateBar
|
||||||
|
|
||||||
|
PBar = ProgressBar
|
||||||
|
Prog = ProgressBar
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# ---------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------- #
|
||||||
# Image #
|
# Image #
|
||||||
|
@ -2695,7 +2714,7 @@ class Canvas(Element):
|
||||||
""" """
|
""" """
|
||||||
if self._TKCanvas is None:
|
if self._TKCanvas is None:
|
||||||
print('*** Did you forget to call Finalize()? Your code should look something like: ***')
|
print('*** Did you forget to call Finalize()? Your code should look something like: ***')
|
||||||
print('*** form = sg.Window("My Form").Layout(layout).Finalize() ***')
|
print('*** window = sg.Window("My Form", layout, finalize=True) ***')
|
||||||
return self._TKCanvas
|
return self._TKCanvas
|
||||||
|
|
||||||
set_focus = Element.SetFocus
|
set_focus = Element.SetFocus
|
||||||
|
@ -3327,6 +3346,7 @@ class Frame(Element):
|
||||||
elif visible is True:
|
elif visible is True:
|
||||||
self.TKFrame.pack()
|
self.TKFrame.pack()
|
||||||
|
|
||||||
|
|
||||||
add_row = AddRow
|
add_row = AddRow
|
||||||
layout = Layout
|
layout = Layout
|
||||||
set_focus = Element.SetFocus
|
set_focus = Element.SetFocus
|
||||||
|
@ -4011,6 +4031,7 @@ class Column(Element):
|
||||||
set_tooltip = Element.SetTooltip
|
set_tooltip = Element.SetTooltip
|
||||||
update = Update
|
update = Update
|
||||||
|
|
||||||
|
Col = Column
|
||||||
|
|
||||||
# ---------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------- #
|
||||||
# Pane #
|
# Pane #
|
||||||
|
@ -6150,8 +6171,6 @@ class Window:
|
||||||
return self.Read(*args, **kwargs)
|
return self.Read(*args, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
add_row = AddRow
|
add_row = AddRow
|
||||||
add_rows = AddRows
|
add_rows = AddRows
|
||||||
alpha_channel = AlphaChannel
|
alpha_channel = AlphaChannel
|
||||||
|
|
Loading…
Reference in New Issue