Merge pull request #647 from MikeTheWatchGuy/Dev-latest
NEW Parameter - change_submits added to file and folder browse buttons
This commit is contained in:
commit
1baaf0a71b
|
@ -1212,10 +1212,7 @@ class Output(Element):
|
||||||
# ---------------------------------------------------------------------- #
|
# ---------------------------------------------------------------------- #
|
||||||
class Button(Element):
|
class Button(Element):
|
||||||
def __init__(self, button_text='', button_type=BUTTON_TYPE_READ_FORM, target=(None, None), tooltip=None,
|
def __init__(self, button_text='', button_type=BUTTON_TYPE_READ_FORM, target=(None, None), tooltip=None,
|
||||||
file_types=(("ALL Files", "*.*"),), initial_folder=None, disabled=False, image_filename=None,
|
file_types=(("ALL Files", "*.*"),), initial_folder=None, disabled=False, change_submits=False, image_filename=None, image_data=None, image_size=(None, None), image_subsample=None, border_width=None, size=(None, None), auto_size_button=None, button_color=None, font=None, bind_return_key=False, focus=False, pad=None, key=None):
|
||||||
image_data=None, image_size=(None, None), image_subsample=None, border_width=None, size=(None, None),
|
|
||||||
auto_size_button=None, button_color=None, font=None, bind_return_key=False,
|
|
||||||
focus=False, pad=None, key=None):
|
|
||||||
'''
|
'''
|
||||||
Button Element
|
Button Element
|
||||||
:param button_text:
|
:param button_text:
|
||||||
|
@ -1259,6 +1256,7 @@ class Button(Element):
|
||||||
self.DefaultDate_M_D_Y = (None, None, None)
|
self.DefaultDate_M_D_Y = (None, None, None)
|
||||||
self.InitialFolder = initial_folder
|
self.InitialFolder = initial_folder
|
||||||
self.Disabled = disabled
|
self.Disabled = disabled
|
||||||
|
self.ChangeSubmits = change_submits
|
||||||
|
|
||||||
super().__init__(ELEM_TYPE_BUTTON, size=size, font=font, pad=pad, key=key, tooltip=tooltip)
|
super().__init__(ELEM_TYPE_BUTTON, size=size, font=font, pad=pad, key=key, tooltip=tooltip)
|
||||||
return
|
return
|
||||||
|
@ -3210,46 +3208,45 @@ FlexForm = Window
|
||||||
|
|
||||||
# ------------------------- FOLDER BROWSE Element lazy function ------------------------- #
|
# ------------------------- FOLDER BROWSE Element lazy function ------------------------- #
|
||||||
def FolderBrowse(button_text='Browse', target=(ThisRow, -1), initial_folder=None, tooltip=None, size=(None, None),
|
def FolderBrowse(button_text='Browse', target=(ThisRow, -1), initial_folder=None, tooltip=None, size=(None, None),
|
||||||
auto_size_button=None, button_color=None, disabled=False, font=None, pad=None, key=None):
|
auto_size_button=None, button_color=None, disabled=False, change_submits=False, font=None, pad=None, key=None):
|
||||||
return Button(button_text=button_text, button_type=BUTTON_TYPE_BROWSE_FOLDER, target=target,
|
return Button(button_text=button_text, button_type=BUTTON_TYPE_BROWSE_FOLDER, target=target,
|
||||||
initial_folder=initial_folder, tooltip=tooltip, size=size, auto_size_button=auto_size_button,
|
initial_folder=initial_folder, tooltip=tooltip, size=size, auto_size_button=auto_size_button,
|
||||||
disabled=disabled, button_color=button_color, font=font, pad=pad, key=key)
|
disabled=disabled, button_color=button_color,change_submits=change_submits, font=font, pad=pad, key=key)
|
||||||
|
|
||||||
|
|
||||||
# ------------------------- FILE BROWSE Element lazy function ------------------------- #
|
# ------------------------- FILE BROWSE Element lazy function ------------------------- #
|
||||||
def FileBrowse(button_text='Browse', target=(ThisRow, -1), file_types=(("ALL Files", "*.*"),), initial_folder=None,
|
def FileBrowse(button_text='Browse', target=(ThisRow, -1), file_types=(("ALL Files", "*.*"),), initial_folder=None,
|
||||||
tooltip=None, size=(None, None), auto_size_button=None, button_color=None, font=None, disabled=False,
|
tooltip=None, size=(None, None), auto_size_button=None, button_color=None, change_submits=False, font=None, disabled=False,
|
||||||
pad=None, key=None):
|
pad=None, key=None):
|
||||||
return Button(button_text=button_text, button_type=BUTTON_TYPE_BROWSE_FILE, target=target, file_types=file_types,
|
return Button(button_text=button_text, button_type=BUTTON_TYPE_BROWSE_FILE, target=target, file_types=file_types,
|
||||||
initial_folder=initial_folder, tooltip=tooltip, size=size, auto_size_button=auto_size_button,
|
initial_folder=initial_folder, tooltip=tooltip, size=size, auto_size_button=auto_size_button, change_submits=change_submits, disabled=disabled, button_color=button_color, font=font, pad=pad, key=key)
|
||||||
disabled=disabled, button_color=button_color, font=font, pad=pad, key=key)
|
|
||||||
|
|
||||||
|
|
||||||
# ------------------------- FILES BROWSE Element (Multiple file selection) lazy function ------------------------- #
|
# ------------------------- FILES BROWSE Element (Multiple file selection) lazy function ------------------------- #
|
||||||
def FilesBrowse(button_text='Browse', target=(ThisRow, -1), file_types=(("ALL Files", "*.*"),), disabled=False,
|
def FilesBrowse(button_text='Browse', target=(ThisRow, -1), file_types=(("ALL Files", "*.*"),), disabled=False,
|
||||||
initial_folder=None, tooltip=None, size=(None, None), auto_size_button=None, button_color=None,
|
initial_folder=None, tooltip=None, size=(None, None), auto_size_button=None, button_color=None, change_submits=False,
|
||||||
font=None, pad=None, key=None):
|
font=None, pad=None, key=None):
|
||||||
return Button(button_text=button_text, button_type=BUTTON_TYPE_BROWSE_FILES, target=target, file_types=file_types,
|
return Button(button_text=button_text, button_type=BUTTON_TYPE_BROWSE_FILES, target=target, file_types=file_types,
|
||||||
initial_folder=initial_folder, tooltip=tooltip, size=size, auto_size_button=auto_size_button,
|
initial_folder=initial_folder,change_submits=change_submits, tooltip=tooltip, size=size, auto_size_button=auto_size_button,
|
||||||
disabled=disabled, button_color=button_color, font=font, pad=pad, key=key)
|
disabled=disabled, button_color=button_color, font=font, pad=pad, key=key)
|
||||||
|
|
||||||
|
|
||||||
# ------------------------- FILE BROWSE Element lazy function ------------------------- #
|
# ------------------------- FILE BROWSE Element lazy function ------------------------- #
|
||||||
def FileSaveAs(button_text='Save As...', target=(ThisRow, -1), file_types=(("ALL Files", "*.*"),), initial_folder=None,
|
def FileSaveAs(button_text='Save As...', target=(ThisRow, -1), file_types=(("ALL Files", "*.*"),), initial_folder=None,
|
||||||
disabled=False, tooltip=None, size=(None, None), auto_size_button=None, button_color=None, font=None,
|
disabled=False, tooltip=None, size=(None, None), auto_size_button=None, button_color=None, change_submits=False, font=None,
|
||||||
pad=None, key=None):
|
pad=None, key=None):
|
||||||
return Button(button_text=button_text, button_type=BUTTON_TYPE_SAVEAS_FILE, target=target, file_types=file_types,
|
return Button(button_text=button_text, button_type=BUTTON_TYPE_SAVEAS_FILE, target=target, file_types=file_types,
|
||||||
initial_folder=initial_folder, tooltip=tooltip, size=size, disabled=disabled,
|
initial_folder=initial_folder, tooltip=tooltip, size=size, disabled=disabled,
|
||||||
auto_size_button=auto_size_button, button_color=button_color, font=font, pad=pad, key=key)
|
auto_size_button=auto_size_button, button_color=button_color, change_submits=change_submits, font=font, pad=pad, key=key)
|
||||||
|
|
||||||
|
|
||||||
# ------------------------- SAVE AS Element lazy function ------------------------- #
|
# ------------------------- SAVE AS Element lazy function ------------------------- #
|
||||||
def SaveAs(button_text='Save As...', target=(ThisRow, -1), file_types=(("ALL Files", "*.*"),), initial_folder=None,
|
def SaveAs(button_text='Save As...', target=(ThisRow, -1), file_types=(("ALL Files", "*.*"),), initial_folder=None,
|
||||||
disabled=False, tooltip=None, size=(None, None), auto_size_button=None, button_color=None, font=None,
|
disabled=False, tooltip=None, size=(None, None), auto_size_button=None, button_color=None, change_submits=False, font=None,
|
||||||
pad=None, key=None):
|
pad=None, key=None):
|
||||||
return Button(button_text=button_text, button_type=BUTTON_TYPE_SAVEAS_FILE, target=target, file_types=file_types,
|
return Button(button_text=button_text, button_type=BUTTON_TYPE_SAVEAS_FILE, target=target, file_types=file_types,
|
||||||
initial_folder=initial_folder, tooltip=tooltip, size=size, disabled=disabled,
|
initial_folder=initial_folder, tooltip=tooltip, size=size, disabled=disabled,
|
||||||
auto_size_button=auto_size_button, button_color=button_color, font=font, pad=pad, key=key)
|
auto_size_button=auto_size_button, button_color=button_color, change_submits=change_submits, font=font, pad=pad, key=key)
|
||||||
|
|
||||||
|
|
||||||
# ------------------------- SAVE BUTTON Element lazy function ------------------------- #
|
# ------------------------- SAVE BUTTON Element lazy function ------------------------- #
|
||||||
|
|
Loading…
Reference in New Issue