Allows browsing of multiple files. File list is returned as a single list with the delimiter defined using the files_delimiter parameter. :param button_text: text in the button (Default value = 'Browse') :type button_text: (str) :param target: key or (row,col)
(button_text='Browse', target=(ThisRow, -1), file_types=FILE_TYPES_ALL_FILES, disabled=False,
initial_folder=None, tooltip=None, size=(None, None), s=(None, None), auto_size_button=None, button_color=None,
change_submits=False, enable_events=False,
font=None, pad=None, p=None, key=None, k=None, visible=True, files_delimiter=BROWSE_FILES_DELIMITER, metadata=None, expand_x=False, expand_y=False)
| 13499 | |
| 13500 | # ------------------------- FILES BROWSE Element (Multiple file selection) lazy function ------------------------- # |
| 13501 | def FilesBrowse(button_text='Browse', target=(ThisRow, -1), file_types=FILE_TYPES_ALL_FILES, disabled=False, |
| 13502 | initial_folder=None, tooltip=None, size=(None, None), s=(None, None), auto_size_button=None, button_color=None, |
| 13503 | change_submits=False, enable_events=False, |
| 13504 | font=None, pad=None, p=None, key=None, k=None, visible=True, files_delimiter=BROWSE_FILES_DELIMITER, metadata=None, expand_x=False, expand_y=False): |
| 13505 | """ |
| 13506 | Allows browsing of multiple files. File list is returned as a single list with the delimiter defined using the files_delimiter parameter. |
| 13507 | |
| 13508 | :param button_text: text in the button (Default value = 'Browse') |
| 13509 | :type button_text: (str) |
| 13510 | :param target: key or (row,col) target for the button (Default value = (ThisRow, -1)) |
| 13511 | :type target: str | (int, int) |
| 13512 | :param file_types: Default value = (("ALL Files", "*.* *"),). |
| 13513 | :type file_types: Tuple[(str, str), ...] |
| 13514 | :param disabled: set disable state for element (Default = False) |
| 13515 | :type disabled: (bool) |
| 13516 | :param initial_folder: starting path for folders and files |
| 13517 | :type initial_folder: (str) |
| 13518 | :param tooltip: text, that will appear when mouse hovers over the element |
| 13519 | :type tooltip: (str) |
| 13520 | :param size: (w,h) w=characters-wide, h=rows-high |
| 13521 | :type size: (int, int) |
| 13522 | :param s: Same as size parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, size will be used |
| 13523 | :type s: (int, int) | (None, None) | int |
| 13524 | :param auto_size_button: True if button size is determined by button text |
| 13525 | :type auto_size_button: (bool) |
| 13526 | :param button_color: button color (foreground, background) |
| 13527 | :type button_color: (str, str) | str |
| 13528 | :param change_submits: If True, pressing Enter key submits window (Default = False) |
| 13529 | :type change_submits: (bool) |
| 13530 | :param enable_events: Turns on the element specific events.(Default = False) |
| 13531 | :type enable_events: (bool) |
| 13532 | :param font: specifies the font family, size, etc. Tuple or Single string format 'name size styles'. Styles: italic * roman bold normal underline overstrike |
| 13533 | :type font: (str or (str, int[, str]) or None) |
| 13534 | :param pad: Amount of padding to put around element in pixels (left/right, top/bottom) or ((left, right), (top, bottom)) or an int. If an int, then it's converted into a tuple (int, int) |
| 13535 | :type pad: (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | int |
| 13536 | :param p: Same as pad parameter. It's an alias. If EITHER of them are set, then the one that's set will be used. If BOTH are set, pad will be used |
| 13537 | :type p: (int, int) or ((int, int),(int,int)) or (int,(int,int)) or ((int, int),int) | int |
| 13538 | :param key: key for uniquely identify this element (for window.find_element) |
| 13539 | :type key: str | int | tuple | object |
| 13540 | :param k: Same as the Key. You can use either k or key. Which ever is set will be used. |
| 13541 | :type k: str | int | tuple | object |
| 13542 | :param visible: set initial visibility state of the Button |
| 13543 | :type visible: (bool) |
| 13544 | :param files_delimiter: String to place between files when multiple files are selected. Normally a ; |
| 13545 | :type files_delimiter: str |
| 13546 | :param metadata: Anything you want to store along with this button |
| 13547 | :type metadata: (Any) |
| 13548 | :param expand_x: If True Element will expand in the Horizontal directions |
| 13549 | :type expand_x: (bool) |
| 13550 | :param expand_y: If True Element will expand in the Vertical directions |
| 13551 | :type expand_y: (bool) |
| 13552 | :return: returns a button |
| 13553 | :rtype: (Button) |
| 13554 | """ |
| 13555 | button = Button(button_text=button_text, button_type=BUTTON_TYPE_BROWSE_FILES, target=target, file_types=file_types, |
| 13556 | initial_folder=initial_folder, change_submits=change_submits, enable_events=enable_events, |
| 13557 | tooltip=tooltip, size=size, s=s, auto_size_button=auto_size_button, |
| 13558 | disabled=disabled, button_color=button_color, font=font, pad=pad, p=p, key=key, k=k, visible=visible, metadata=metadata, expand_x=expand_x, expand_y=expand_y) |