Merge pull request #926 from MikeTheWatchGuy/Dev-latest
Pane Element - Relief support
This commit is contained in:
commit
52cb2e6fba
|
@ -2472,7 +2472,7 @@ class Column(Element):
|
||||||
# Pane #
|
# Pane #
|
||||||
# ---------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------- #
|
||||||
class Pane(Element):
|
class Pane(Element):
|
||||||
def __init__(self, pane_list, background_color=None, size=(None, None), pad=None, orientation='vertical', show_handle=True, key=None, visible=True):
|
def __init__(self, pane_list, background_color=None, size=(None, None), pad=None, orientation='vertical', show_handle=True, relief=RELIEF_RAISED ,key=None, visible=True):
|
||||||
'''
|
'''
|
||||||
Container for elements that are stacked into rows
|
Container for elements that are stacked into rows
|
||||||
:param layout:
|
:param layout:
|
||||||
|
@ -2495,6 +2495,7 @@ class Pane(Element):
|
||||||
self.Orientation = orientation
|
self.Orientation = orientation
|
||||||
self.PaneList = pane_list
|
self.PaneList = pane_list
|
||||||
self.ShowHandle = show_handle
|
self.ShowHandle = show_handle
|
||||||
|
self.Relief = relief
|
||||||
|
|
||||||
bg = background_color if background_color is not None else DEFAULT_BACKGROUND_COLOR
|
bg = background_color if background_color is not None else DEFAULT_BACKGROUND_COLOR
|
||||||
|
|
||||||
|
@ -4400,10 +4401,12 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form):
|
||||||
|
|
||||||
# ------------------------- Pane element ------------------------- #
|
# ------------------------- Pane element ------------------------- #
|
||||||
if element_type == ELEM_TYPE_PANE:
|
if element_type == ELEM_TYPE_PANE:
|
||||||
|
|
||||||
element.PanedWindow = tk.PanedWindow(tk_row_frame,
|
element.PanedWindow = tk.PanedWindow(tk_row_frame,
|
||||||
orient=tk.VERTICAL if element.Orientation.startswith('v') else tk.HORIZONTAL,
|
orient=tk.VERTICAL if element.Orientation.startswith('v') else tk.HORIZONTAL,
|
||||||
relief=tk.RAISED,
|
|
||||||
)
|
)
|
||||||
|
if element.Relief is not None:
|
||||||
|
element.PanedWindow.configure(relief=element.Relief)
|
||||||
if element.ShowHandle:
|
if element.ShowHandle:
|
||||||
element.PanedWindow.config(showhandle=True)
|
element.PanedWindow.config(showhandle=True)
|
||||||
if element.Size != (None, None):
|
if element.Size != (None, None):
|
||||||
|
|
Loading…
Reference in New Issue