Output Element - Visible, Invisible supported
This commit is contained in:
parent
59f866e858
commit
9c548021d5
|
@ -369,7 +369,7 @@ class Element():
|
||||||
self.Tooltip = tooltip
|
self.Tooltip = tooltip
|
||||||
self.TooltipObject = None
|
self.TooltipObject = None
|
||||||
self.Visible = visible
|
self.Visible = visible
|
||||||
|
self.TKRightClickMenu = None
|
||||||
|
|
||||||
def RightClickMenuCallback(self, event):
|
def RightClickMenuCallback(self, event):
|
||||||
self.TKRightClickMenu.tk_popup(event.x_root, event.y_root, 0)
|
self.TKRightClickMenu.tk_popup(event.x_root, event.y_root, 0)
|
||||||
|
@ -1404,9 +1404,9 @@ class Output(Element):
|
||||||
self._TKOut.output.delete('1.0', tk.END)
|
self._TKOut.output.delete('1.0', tk.END)
|
||||||
self._TKOut.output.insert(tk.END, value)
|
self._TKOut.output.insert(tk.END, value)
|
||||||
if visible is False:
|
if visible is False:
|
||||||
self._TKOut.pack_forget()
|
self._TKOut.frame.pack_forget()
|
||||||
elif visible is True:
|
elif visible is True:
|
||||||
self._TKOut.pack()
|
self._TKOut.frame.pack()
|
||||||
|
|
||||||
def __del__(self):
|
def __del__(self):
|
||||||
try:
|
try:
|
||||||
|
@ -5275,7 +5275,7 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form:Window):
|
||||||
pad=elementpad)
|
pad=elementpad)
|
||||||
element._TKOut.pack(side=tk.LEFT, expand=True, fill='both')
|
element._TKOut.pack(side=tk.LEFT, expand=True, fill='both')
|
||||||
if element.Visible is False:
|
if element.Visible is False:
|
||||||
element._TKOut.pack_forget()
|
element._TKOut.frame.pack_forget()
|
||||||
if element.Tooltip is not None:
|
if element.Tooltip is not None:
|
||||||
element.TooltipObject = ToolTip(element._TKOut, text=element.Tooltip, timeout=DEFAULT_TOOLTIP_TIME)
|
element.TooltipObject = ToolTip(element._TKOut, text=element.Tooltip, timeout=DEFAULT_TOOLTIP_TIME)
|
||||||
if element.RightClickMenu or toplevel_form.RightClickMenu:
|
if element.RightClickMenu or toplevel_form.RightClickMenu:
|
||||||
|
|
Loading…
Reference in New Issue