commit
96daf19fc0
|
@ -5068,7 +5068,7 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form):
|
||||||
elif toplevel_form.TextJustification is not None:
|
elif toplevel_form.TextJustification is not None:
|
||||||
justification = toplevel_form.TextJustification
|
justification = toplevel_form.TextJustification
|
||||||
else:
|
else:
|
||||||
justification = DEFAULT_TEXT_JUSTIFICAION
|
justification = DEFAULT_TEXT_JUSTIFICATION
|
||||||
justify = tk.LEFT if justification == 'left' else tk.CENTER if justification == 'center' else tk.RIGHT
|
justify = tk.LEFT if justification == 'left' else tk.CENTER if justification == 'center' else tk.RIGHT
|
||||||
anchor = tk.NW if justification == 'left' else tk.N if justification == 'center' else tk.NE
|
anchor = tk.NW if justification == 'left' else tk.N if justification == 'center' else tk.NE
|
||||||
# tktext_label = tk.Label(tk_row_frame, textvariable=stringvar, width=width, height=height,
|
# tktext_label = tk.Label(tk_row_frame, textvariable=stringvar, width=width, height=height,
|
||||||
|
@ -5614,7 +5614,8 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form):
|
||||||
bd=border_depth)
|
bd=border_depth)
|
||||||
else:
|
else:
|
||||||
element.tktext_label = element.Widget = tk.Label(tk_row_frame, width=width, height=height, bd=border_depth)
|
element.tktext_label = element.Widget = tk.Label(tk_row_frame, width=width, height=height, bd=border_depth)
|
||||||
if element.BackgroundColor is not None:
|
|
||||||
|
if not element.BackgroundColor in (None, COLOR_SYSTEM_DEFAULT):
|
||||||
element.tktext_label.config(background=element.BackgroundColor)
|
element.tktext_label.config(background=element.BackgroundColor)
|
||||||
|
|
||||||
element.tktext_label.image = photo
|
element.tktext_label.image = photo
|
||||||
|
@ -7752,10 +7753,6 @@ def main():
|
||||||
[Listbox(['Listbox 1', 'Listbox 2', 'Listbox 3'], size=(20, 5))],
|
[Listbox(['Listbox 1', 'Listbox 2', 'Listbox 3'], size=(20, 5))],
|
||||||
[Combo(['Combo item 1', ], size=(20, 3), text_color='red', background_color='red')],
|
[Combo(['Combo item 1', ], size=(20, 3), text_color='red', background_color='red')],
|
||||||
[Combo(['Combo item 1', ], size=(20, 3), text_color='red', background_color='red')],
|
[Combo(['Combo item 1', ], size=(20, 3), text_color='red', background_color='red')],
|
||||||
[Combo(['Combo item 1', ], size=(20, 3), text_color='red', background_color='red')],
|
|
||||||
[Combo(['Combo item 1', ], size=(20, 3), text_color='red', background_color='red')],
|
|
||||||
[Combo(['Combo item 1', ], size=(20, 3), text_color='red', background_color='red')],
|
|
||||||
[Combo(['Combo item 1', ], size=(20, 3), text_color='red', background_color='red')],
|
|
||||||
[Spin([1, 2, 3], size=(4, 3))],
|
[Spin([1, 2, 3], size=(4, 3))],
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
|
@ -49,13 +49,13 @@ def non_user_init():
|
||||||
def _event_once(mylocals, myglobals):
|
def _event_once(mylocals, myglobals):
|
||||||
global myrc, watcher_window
|
global myrc, watcher_window
|
||||||
if not watcher_window:
|
if not watcher_window:
|
||||||
return
|
return False
|
||||||
_window = watcher_window
|
_window = watcher_window
|
||||||
_event, _values = _window.Read(timeout=1)
|
_event, _values = _window.Read(timeout=1)
|
||||||
if _event in (None, 'Exit'):
|
if _event in (None, 'Exit'):
|
||||||
_window.Close()
|
_window.Close()
|
||||||
watcher_window = None
|
watcher_window = None
|
||||||
return
|
return False
|
||||||
cmd = _values['_INTERACTIVE_']
|
cmd = _values['_INTERACTIVE_']
|
||||||
if _event == 'Run':
|
if _event == 'Run':
|
||||||
_runCommand(cmd=cmd, window=_window)
|
_runCommand(cmd=cmd, window=_window)
|
||||||
|
@ -99,7 +99,7 @@ PySimpleGUIdebugger.PySimpleGUIdebugger.myrc = {} """.format(_values[key])
|
||||||
_window.Element(out_key).Update(myrc)
|
_window.Element(out_key).Update(myrc)
|
||||||
else:
|
else:
|
||||||
_window.Element(out_key).Update('')
|
_window.Element(out_key).Update('')
|
||||||
return
|
return True
|
||||||
|
|
||||||
|
|
||||||
def _runCommand(cmd, timeout=None, window=None):
|
def _runCommand(cmd, timeout=None, window=None):
|
||||||
|
@ -121,7 +121,7 @@ def _runCommand(cmd, timeout=None, window=None):
|
||||||
return (retval, output)
|
return (retval, output)
|
||||||
|
|
||||||
def refresh(locals, globals):
|
def refresh(locals, globals):
|
||||||
_event_once(locals, globals)
|
return _event_once(locals, globals)
|
||||||
|
|
||||||
def initialize():
|
def initialize():
|
||||||
global watcher_window
|
global watcher_window
|
||||||
|
|
Loading…
Reference in New Issue