Merge pull request #1325 from PySimpleGUI/Dev-latest
Added VerticalSeparator Element!
This commit is contained in:
commit
18885771e1
|
@ -2054,14 +2054,15 @@ class Frame(Element):
|
||||||
# Routes stdout, stderr to a scrolled window #
|
# Routes stdout, stderr to a scrolled window #
|
||||||
# ---------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------- #
|
||||||
class VerticalSeparator(Element):
|
class VerticalSeparator(Element):
|
||||||
def __init__(self, pad=None):
|
def __init__(self, size=(None, None), size_px=None, pad=None):
|
||||||
'''
|
'''
|
||||||
VerticalSeperator - A separator that spans only 1 row in a vertical fashion
|
VerticalSeperator - A separator that spans only 1 row in a vertical fashion
|
||||||
:param pad:
|
:param pad:
|
||||||
'''
|
'''
|
||||||
self.Orientation = 'vertical' # for now only vertical works
|
self.Orientation = 'vertical' # for now only vertical works
|
||||||
|
self.Disabled = None
|
||||||
super().__init__(ELEM_TYPE_SEPARATOR, pad=pad)
|
self.WxStaticLine = None # type: wx.StaticLine
|
||||||
|
super().__init__(ELEM_TYPE_SEPARATOR, pad=pad, size=size, size_px=size_px)
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
super().__del__()
|
super().__del__()
|
||||||
|
@ -5311,7 +5312,14 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form):
|
||||||
# timeout=DEFAULT_TOOLTIP_TIME)
|
# timeout=DEFAULT_TOOLTIP_TIME)
|
||||||
# ------------------------- Separator element ------------------------- #
|
# ------------------------- Separator element ------------------------- #
|
||||||
elif element_type == ELEM_TYPE_SEPARATOR:
|
elif element_type == ELEM_TYPE_SEPARATOR:
|
||||||
pass
|
element # type: VerticalSeparator
|
||||||
|
element.WxStaticLine = static_line = wx.StaticLine(toplevel_form.MasterPanel, style=wx.LI_VERTICAL)
|
||||||
|
|
||||||
|
do_font_and_color(element.WxStaticLine)
|
||||||
|
|
||||||
|
sizer = pad_widget(static_line)
|
||||||
|
|
||||||
|
hsizer.Add(sizer, 0)
|
||||||
# separator = ttk.Separator(tk_row_frame, orient=element.Orientation, )
|
# separator = ttk.Separator(tk_row_frame, orient=element.Orientation, )
|
||||||
# separator.pack(side=tk.LEFT, padx=element.Pad[0], pady=element.Pad[1], fill='both', expand=True)
|
# separator.pack(side=tk.LEFT, padx=element.Pad[0], pady=element.Pad[1], fill='both', expand=True)
|
||||||
#
|
#
|
||||||
|
|
Loading…
Reference in New Issue