Table Of Contents

Previous topic

fileselector Module

Next topic

fileselector_entry Module

fileselector_button Module

../_images/fileselector-button-preview.png

Widget description

This is a button that, when clicked, creates an Elementary window (or inner window) with a Fileselector within.

When a file is chosen, the (inner) window is closed and the button emits a signal having the selected file as it’s event_info.

This widget encapsulates operations on its internal file selector on its own API. There is less control over its file selector than that one would have instantiating one directly.

The following styles are available for this button:

  • "default"
  • "anchor"
  • "hoversel_vertical"
  • "hoversel_vertical_entry"

This widget emits the following signals, besides the ones sent from Button:

  • "file,chosen" - the user has selected a path which comes as the event_info data

Default text parts of the fileselector_button widget that you can use for are:

  • “default” - Label of the fileselector_button

Default content parts of the fileselector_button widget that you can use for are:

  • “icon” - Icon of the fileselector_button
class efl.elementary.fileselector_button.FileselectorButton

Bases: efl.elementary.button.Button

This is the class that actually implements the widget.

callback_file_chosen_add()

The user has selected a path which comes as the event_info data.

expandable

Enable/disable a tree view in the given file selector button widget’s internal file selector

This has the same effect as efl.elementary.fileselector.Fileselector.expandable, but now applied to a file selector button’s internal file selector.

Note

There’s no way to put a file selector button’s internal file selector in “grid mode”, as one may do with “pure” file selectors.

Type :bool
folder_only

Whether a given file selector button widget’s internal file selector is to display folders only or the directory contents, as well.

This has the same effect as efl.elementary.fileselector.Fileselector.folder_only, but now applied to a file selector button’s internal file selector.

Type :bool
inwin_mode

Whether a given file selector button widget’s internal file selector will raise an Elementary “inner window”, instead of a dedicated Elementary window. By default, it won’t.

See also

InnerWindow for more information on inner windows

Type :bool
is_save

Enable/disable the file name entry box where the user can type in a name for a file, in a given file selector button widget’s internal file selector.

This has the same effect as efl.elementary.fileselector.Fileselector.is_save, but now applied to a file selector button’s internal file selector.

Type :bool
path

The initial file system path for a given file selector button widget

It must be a directory path, which will have the contents displayed initially in the file selector’s view. The default initial path is the "HOME" environment variable’s value.

Type :string
window_size

The size of a given file selector button widget’s window, holding the file selector itself.

Note

Setting this will only take any effect if the file selector button widget is not under “inwin mode”. The default size for the window (when applicable) is 400x400 pixels.

Type :tuple of Evas_Coords (int)
window_title

The title for a given file selector button widget’s window

This is the popup window’s title, when the file selector pops out after a click on the button. Those windows have the default (unlocalized) value of "Select a file" as titles.

Note

Setting this will only take effect if the file selector button widget is not under “inwin mode”.

Type :string