Merge pull request #748 from MikeTheWatchGuy/Dev-latest

3.15.0 & 1.15.0
This commit is contained in:
MikeTheWatchGuy 2018-11-20 11:07:25 -05:00 committed by GitHub
commit 5aea0860a6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 116 additions and 47 deletions

View file

@ -4070,6 +4070,8 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form):
justification = DEFAULT_TEXT_JUSTIFICATION
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
# tktext_label = tk.Label(tk_row_frame, textvariable=stringvar, width=width, height=height,
# justify=justify, bd=border_depth, font=font)
tktext_label = tk.Label(tk_row_frame, textvariable=stringvar, width=width, height=height,
justify=justify, bd=border_depth, font=font)
# Set wrap-length for text (in PIXELS) == PAIN IN THE ASS
@ -4315,7 +4317,7 @@ def PackFormIntoFrame(form, containing_frame, toplevel_form):
default_text = element.DefaultText
width, height = element_size
element.TKText = tk.scrolledtext.ScrolledText(tk_row_frame, width=width, height=height, wrap='word',
bd=border_depth, font=font)
bd=border_depth, font=font, relief=tk.FLAT)
element.TKText.insert(1.0, default_text) # set the default text
if element.BackgroundColor is not None and element.BackgroundColor != COLOR_SYSTEM_DEFAULT:
element.TKText.configure(background=element.BackgroundColor)
@ -5905,8 +5907,8 @@ def Popup(*args, title=None, button_color=None, background_color=None, text_colo
local_line_width = line_width
else:
local_line_width = MESSAGE_BOX_LINE_WIDTH
title = title if title is not None else args_to_print[0]
window = Window(title, auto_size_text=True, background_color=background_color, button_color=button_color,
_title = title if title is not None else args_to_print[0]
window = Window(_title, auto_size_text=True, background_color=background_color, button_color=button_color,
auto_close=auto_close, auto_close_duration=auto_close_duration, icon=icon, font=font,
no_titlebar=no_titlebar, grab_anywhere=grab_anywhere, keep_on_top=keep_on_top, location=location)
max_line_total, total_lines = 0, 0
@ -5977,7 +5979,7 @@ def MsgBox(*args):
# --------------------------- PopupNoButtons ---------------------------
def PopupNoButtons(*args, title='', button_color=None, background_color=None, text_color=None, auto_close=False,
def PopupNoButtons(*args, title=None, button_color=None, background_color=None, text_color=None, auto_close=False,
auto_close_duration=None, non_blocking=False, icon=DEFAULT_WINDOW_ICON, line_width=None, font=None,
no_titlebar=False, grab_anywhere=False, keep_on_top=False, location=(None, None)):
"""
@ -6006,7 +6008,7 @@ def PopupNoButtons(*args, title='', button_color=None, background_color=None, te
# --------------------------- PopupNonBlocking ---------------------------
def PopupNonBlocking(*args, title='', button_type=POPUP_BUTTONS_OK, button_color=None, background_color=None, text_color=None,
def PopupNonBlocking(*args, title=None, button_type=POPUP_BUTTONS_OK, button_color=None, background_color=None, text_color=None,
auto_close=False, auto_close_duration=None, non_blocking=True, icon=DEFAULT_WINDOW_ICON,
line_width=None, font=None, no_titlebar=False, grab_anywhere=False, keep_on_top=False,
location=(None, None)):
@ -6040,7 +6042,7 @@ PopupNoWait = PopupNonBlocking
# --------------------------- PopupQuick - a NonBlocking, Self-closing Popup ---------------------------
def PopupQuick(*args,title='', button_type=POPUP_BUTTONS_OK, button_color=None, background_color=None, text_color=None,
def PopupQuick(*args,title=None, button_type=POPUP_BUTTONS_OK, button_color=None, background_color=None, text_color=None,
auto_close=True, auto_close_duration=2, non_blocking=True, icon=DEFAULT_WINDOW_ICON, line_width=None,
font=None, no_titlebar=False, grab_anywhere=False, keep_on_top=False, location=(None, None)):
"""
@ -6070,7 +6072,7 @@ def PopupQuick(*args,title='', button_type=POPUP_BUTTONS_OK, button_color=None,
# --------------------------- PopupQuick - a NonBlocking, Self-closing Popup with no titlebar and no buttons ---------------------------
def PopupQuickMessage(*args, title='', button_type=POPUP_BUTTONS_NO_BUTTONS, button_color=None, background_color=None, text_color=None,
def PopupQuickMessage(*args, title=None, button_type=POPUP_BUTTONS_NO_BUTTONS, button_color=None, background_color=None, text_color=None,
auto_close=True, auto_close_duration=2, non_blocking=True, icon=DEFAULT_WINDOW_ICON, line_width=None,
font=None, no_titlebar=True, grab_anywhere=False, keep_on_top=False, location=(None, None)):
"""
@ -6100,7 +6102,7 @@ def PopupQuickMessage(*args, title='', button_type=POPUP_BUTTONS_NO_BUTTONS, but
# --------------------------- PopupNoTitlebar ---------------------------
def PopupNoTitlebar(*args, title='', button_type=POPUP_BUTTONS_OK, button_color=None, background_color=None, text_color=None,
def PopupNoTitlebar(*args, title=None, button_type=POPUP_BUTTONS_OK, button_color=None, background_color=None, text_color=None,
auto_close=False, auto_close_duration=None, non_blocking=False, icon=DEFAULT_WINDOW_ICON,
line_width=None, font=None, grab_anywhere=True, keep_on_top=False, location=(None, None)):
"""
@ -6134,7 +6136,7 @@ PopupAnnoying = PopupNoTitlebar
# --------------------------- PopupAutoClose ---------------------------
def PopupAutoClose(*args, title='', button_type=POPUP_BUTTONS_OK, button_color=None, background_color=None, text_color=None,
def PopupAutoClose(*args, title=None, button_type=POPUP_BUTTONS_OK, button_color=None, background_color=None, text_color=None,
auto_close=True, auto_close_duration=None, non_blocking=False, icon=DEFAULT_WINDOW_ICON,
line_width=None, font=None, no_titlebar=False, grab_anywhere=False, keep_on_top=False,
location=(None, None)):
@ -6168,7 +6170,7 @@ PopupTimed = PopupAutoClose
# --------------------------- PopupError ---------------------------
def PopupError(*args, title='', button_color=DEFAULT_ERROR_BUTTON_COLOR, background_color=None, text_color=None, auto_close=False,
def PopupError(*args, title=None, button_color=DEFAULT_ERROR_BUTTON_COLOR, background_color=None, text_color=None, auto_close=False,
auto_close_duration=None, non_blocking=False, icon=DEFAULT_WINDOW_ICON, line_width=None, font=None,
no_titlebar=False, grab_anywhere=False, keep_on_top=False, location=(None, None)):
"""
@ -6196,7 +6198,7 @@ def PopupError(*args, title='', button_color=DEFAULT_ERROR_BUTTON_COLOR, backgro
# --------------------------- PopupCancel ---------------------------
def PopupCancel(*args,title='', button_color=None, background_color=None, text_color=None, auto_close=False,
def PopupCancel(*args,title=None, button_color=None, background_color=None, text_color=None, auto_close=False,
auto_close_duration=None, non_blocking=False, icon=DEFAULT_WINDOW_ICON, line_width=None, font=None,
no_titlebar=False, grab_anywhere=False, keep_on_top=False, location=(None, None)):
"""
@ -6224,7 +6226,7 @@ def PopupCancel(*args,title='', button_color=None, background_color=None, text_c
# --------------------------- PopupOK ---------------------------
def PopupOK(*args, title='', button_color=None, background_color=None, text_color=None, auto_close=False,
def PopupOK(*args, title=None, button_color=None, background_color=None, text_color=None, auto_close=False,
auto_close_duration=None, non_blocking=False, icon=DEFAULT_WINDOW_ICON, line_width=None, font=None,
no_titlebar=False, grab_anywhere=False, keep_on_top=False, location=(None, None)):
"""
@ -6252,7 +6254,7 @@ def PopupOK(*args, title='', button_color=None, background_color=None, text_colo
# --------------------------- PopupOKCancel ---------------------------
def PopupOKCancel(*args, title='', button_color=None, background_color=None, text_color=None, auto_close=False,
def PopupOKCancel(*args, title=None, button_color=None, background_color=None, text_color=None, auto_close=False,
auto_close_duration=None, non_blocking=False, icon=DEFAULT_WINDOW_ICON, line_width=None, font=None,
no_titlebar=False, grab_anywhere=False, keep_on_top=False, location=(None, None)):
"""
@ -6280,7 +6282,7 @@ def PopupOKCancel(*args, title='', button_color=None, background_color=None, te
# --------------------------- PopupYesNo ---------------------------
def PopupYesNo(*args, title='', button_color=None, background_color=None, text_color=None, auto_close=False,
def PopupYesNo(*args, title=None, button_color=None, background_color=None, text_color=None, auto_close=False,
auto_close_duration=None, non_blocking=False, icon=DEFAULT_WINDOW_ICON, line_width=None, font=None,
no_titlebar=False, grab_anywhere=False, keep_on_top=False, location=(None, None)):
"""
@ -6314,7 +6316,7 @@ def PopupYesNo(*args, title='', button_color=None, background_color=None, text_c
# --------------------------- PopupGetFolder ---------------------------
def PopupGetFolder(message, title='', default_path='', no_window=False, size=(None, None), button_color=None,
def PopupGetFolder(message, title=None, default_path='', no_window=False, size=(None, None), button_color=None,
background_color=None, text_color=None, icon=DEFAULT_WINDOW_ICON, font=None, no_titlebar=False,
grab_anywhere=False, keep_on_top=False, location=(None, None), initial_folder=None):
"""
@ -6370,7 +6372,7 @@ def PopupGetFolder(message, title='', default_path='', no_window=False, size=(No
# --------------------------- PopupGetFile ---------------------------
def PopupGetFile(message, title='', default_path='', default_extension='', save_as=False, file_types=(("ALL Files", "*.*"),),
def PopupGetFile(message, title=None, default_path='', default_extension='', save_as=False, file_types=(("ALL Files", "*.*"),),
no_window=False, size=(None, None), button_color=None, background_color=None, text_color=None,
icon=DEFAULT_WINDOW_ICON, font=None, no_titlebar=False, grab_anywhere=False, keep_on_top=False,
location=(None, None), initial_folder=None):
@ -6435,7 +6437,7 @@ def PopupGetFile(message, title='', default_path='', default_extension='', save_
# --------------------------- PopupGetText ---------------------------
def PopupGetText(message, title='', default_text='', password_char='', size=(None, None), button_color=None,
def PopupGetText(message, title=None, default_text='', password_char='', size=(None, None), button_color=None,
background_color=None, text_color=None, icon=DEFAULT_WINDOW_ICON, font=None, no_titlebar=False,
grab_anywhere=False, keep_on_top=False, location=(None, None)):
"""