FileSelector#

class ansys.scade.guitools.control.FileSelector(owner, text: str, extension: str, directory: str, filter: str, mode: FSM, wl: int, x: int, y: int, w: int, h: int = c.EDIT_HEIGHT, reference: str = '', **kwargs)#

Bases: StaticEdit

Defines a bundle made of a static, an edit, and a button control.

Parameters#

ownerAny

Owner of the control.

textstr

Text of the static control.

extensionstr

Default extension of the files. This option is ignored when mode is FSM.DIR.

directorystr

Initial directory of the file selector dialog box, or the current directory when empty.

filterstr

Description of the format of the visible files in the file selector dialog box. This option is ignored when mode is FSM.DIR.

modeFSM

Mode of the file seclector dialog box, either FSM.LOAD, FSM.SAVE, or FSM.DIR for browsing directories.

wlint

Width of the static control.

xint

Horizontal position of the control.

yint

Vertical position of the control.

wint

Width of the control.

hint

Height of the control, default csts.EDIT_HEIGHT.

referencestr

Reference directory to resolve or compute a relative path when not empty.

kwargsAny

Other parameters of scade.tool.suite.gui.widgets.EditBox.

Initialize the file selector with the given parameters.

Overview#

on_click

Call the Windows standard open or save selection commands.

on_layout

Declare the constraints with respect to the owner.

set_visible

Show or hide the control.

Import detail#

from ansys.scade.guitools.control import FileSelector

Attribute detail#

FileSelector.btn_dots#
FileSelector.directory#
FileSelector.extension#
FileSelector.filter#
FileSelector.mode#
FileSelector.owner#
FileSelector.reference = ''#

Method detail#

FileSelector.on_click(button: scade.tool.suite.gui.widgets.Button)#

Call the Windows standard open or save selection commands.

FileSelector.on_layout()#

Declare the constraints with respect to the owner.

FileSelector.set_visible(show: bool)#

Show or hide the control.