FileBrowser

class lib.gui.control_helper.FileBrowser(opt_name, tk_var, control_frame, sysbrowser_dict, style)

Bases: object

Add FileBrowser buttons to control and handle routing

Attributes Summary

helptext

Dict containing tooltip text for buttons

Methods Summary

add_browser_buttons()

Add correct file browser button for control

ask_context(filepath, filetypes)

Method to pop the correct dialog depending on context

ask_folder(filepath[, filetypes])

Pop-up to get path to a directory :param filepath: tkinter StringVar object that will store the path to a directory.

ask_load(filepath, filetypes)

Pop-up to get path to a file

ask_multi_load(filepath, filetypes)

Pop-up to get path to a file

ask_nothing(filepath[, filetypes])

Method that does nothing, used for disabling open/save pop up

ask_save(filepath[, filetypes])

Pop-up to get path to save a new file

format_action_option(action_option)

Format the action option to remove any dashes at the start

set_context_action_option(options)

Set the tk_var for the source action option that dictates the context sensitive file browser.

Attributes Documentation

helptext

Dict containing tooltip text for buttons

Methods Documentation

add_browser_buttons()

Add correct file browser button for control

ask_context(filepath, filetypes)

Method to pop the correct dialog depending on context

static ask_folder(filepath, filetypes=None)

Pop-up to get path to a directory :param filepath: tkinter StringVar object that will store the path to a directory. :param filetypes: Unused argument to allow filetypes to be given in ask_load().

static ask_load(filepath, filetypes)

Pop-up to get path to a file

static ask_multi_load(filepath, filetypes)

Pop-up to get path to a file

static ask_nothing(filepath, filetypes=None)

Method that does nothing, used for disabling open/save pop up

static ask_save(filepath, filetypes=None)

Pop-up to get path to save a new file

static format_action_option(action_option)

Format the action option to remove any dashes at the start

set_context_action_option(options)

Set the tk_var for the source action option that dictates the context sensitive file browser.

add_browser_buttons()

Add correct file browser button for control

ask_context(filepath, filetypes)

Method to pop the correct dialog depending on context

static ask_folder(filepath, filetypes=None)

Pop-up to get path to a directory :param filepath: tkinter StringVar object that will store the path to a directory. :param filetypes: Unused argument to allow filetypes to be given in ask_load().

static ask_load(filepath, filetypes)

Pop-up to get path to a file

static ask_multi_load(filepath, filetypes)

Pop-up to get path to a file

static ask_nothing(filepath, filetypes=None)

Method that does nothing, used for disabling open/save pop up

static ask_save(filepath, filetypes=None)

Pop-up to get path to save a new file

static format_action_option(action_option)

Format the action option to remove any dashes at the start

property helptext

Dict containing tooltip text for buttons

set_context_action_option(options)

Set the tk_var for the source action option that dictates the context sensitive file browser.