Merge pull request #291 from MikeTheWatchGuy/Dev-latest

Added keys to Output, Column Elements
This commit is contained in:
MikeTheWatchGuy 2018-09-21 14:05:40 -04:00 committed by GitHub
commit 94faaade69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 4 deletions

View File

@ -931,7 +931,7 @@ class TKOutput(tk.Frame):
# Routes stdout, stderr to a scrolled window # # Routes stdout, stderr to a scrolled window #
# ---------------------------------------------------------------------- # # ---------------------------------------------------------------------- #
class Output(Element): class Output(Element):
def __init__(self, size=(None, None), background_color=None, text_color=None, pad=None, font=None, tooltip=None): def __init__(self, size=(None, None), background_color=None, text_color=None, pad=None, font=None, tooltip=None, key=None):
''' '''
Output Element - reroutes stdout, stderr to this window Output Element - reroutes stdout, stderr to this window
:param size: Size of field in characters :param size: Size of field in characters
@ -941,7 +941,7 @@ class Output(Element):
bg = background_color if background_color else DEFAULT_INPUT_ELEMENTS_COLOR bg = background_color if background_color else DEFAULT_INPUT_ELEMENTS_COLOR
fg = text_color if text_color is not None else DEFAULT_INPUT_TEXT_COLOR fg = text_color if text_color is not None else DEFAULT_INPUT_TEXT_COLOR
super().__init__(ELEM_TYPE_OUTPUT, size=size, background_color=bg, text_color=fg, pad=pad, font=font, tooltip=tooltip) super().__init__(ELEM_TYPE_OUTPUT, size=size, background_color=bg, text_color=fg, pad=pad, font=font, tooltip=tooltip, key=key)
def __del__(self): def __del__(self):
try: try:
@ -1490,7 +1490,7 @@ class TkScrollableFrame(tk.Frame):
# Column # # Column #
# ---------------------------------------------------------------------- # # ---------------------------------------------------------------------- #
class Column(Element): class Column(Element):
def __init__(self, layout, background_color = None, size=(None, None), pad=None, scrollable=False): def __init__(self, layout, background_color = None, size=(None, None), pad=None, scrollable=False, key=None):
self.UseDictionary = False self.UseDictionary = False
self.ReturnValues = None self.ReturnValues = None
self.ReturnValuesList = [] self.ReturnValuesList = []
@ -1505,7 +1505,7 @@ class Column(Element):
self.Layout(layout) self.Layout(layout)
super().__init__(ELEM_TYPE_COLUMN, background_color=background_color, size=size, pad=pad) super().__init__(ELEM_TYPE_COLUMN, background_color=background_color, size=size, pad=pad, key=key)
return return
def AddRow(self, *args): def AddRow(self, *args):