fsleyes_widgets.filepanel

This module provides the FilePanel class.

class fsleyes_widgets.filepanel.FilePanel(parent, filePath='', wildcard='*', buttonText='Load', message='Select file')[source]

Bases: Control

The FilePanel is a wx.Control which contains a text label and a button. The text label displays a file path, and the button opens a dialog allowing the user to select a new file.

Create a new FilePanel.

Parameters:
  • parent – Parent wx object.

  • filePath – Initial file path to display.

  • wildcard – File path wildcard to use to restrict what is displayed in the file dialog.

  • buttonText – Text to display on file dialog button

  • message – Message to display in file dialog.

property loadButton

Return a reference to the load button (for testing).

GetFilePath()[source]

Return the current file path.

SetFilePath(path)[source]

Programmatically update the current file path.

fsleyes_widgets.filepanel.EVT_FILE_PANEL_EVENT = <wx.core.PyEventBinder object>

Identifier for the FilePanelEvent.

fsleyes_widgets.filepanel.FilePanelEvent

Event emitted by a FilePanel when the user selects a new file.