Skip to content

TTMSFNCDirectoryEdit

The TTMSFNCDirectoryEdit is a visual control that behaves similarly to a TTMSFNCEdit while also providing a button to open a directory picker. When a directory is selected, its path is placed into the edit field. It includes a range of configurable options, such as customizable button settings, an optional label, and built-in lookup functionality.

TTMSFNCDirectoryEdit

Properties

Property name Description
AutoDirectoryLookup: Boolean Enables or disables automatic directory lookup. If True, the component automatically performs a lookup for valid directories as the user types. Default is False.
Button: TTMSFNCToolBarButton Provides access to the internal TTMSFNCToolBarButton control used as the button for launching the directory picker.
ButtonSettings Configures the settings of the button that triggers the directory picker. You can customize appearance, icon, position, size, and text related to the button.
DialogCaption: string Sets the caption of the directory picker dialog when it is shown. This provides a way to customize the title displayed in the picker dialog.
Edit: TTMSFNCEdit Provides access to the internal TTMSFNCEdit control used to manage the edit field's behavior and text display.
EmptyText: string Specifies a placeholder text to display when the edit field is empty.
EditorEnabled: Boolean Controls whether the edit field is enabled or disabled. If False, the user cannot type in the field but can still select a directory via the button. Default is True.
LabelSettings Allows you to configure optional label properties, such as label text, position, font and spacing between the label and the control.
Text: string The actual text that is shown in the edit field. This property reflects the selected directory's path or the text typed in by the user.

Methods

Method name Description
IsValidDirectory: Boolean Checks whether the currently entered text (path) is a valid directory.
ClickButton Programmatically triggers the button to open the directory picker dialog.

Events

Event name Description
OnDialogClose Triggered when the directory picker dialog is closed, regardless of whether the user selected a directory or canceled the operation. The ASuccess Boolean parameter will reflect the cancellation.
OnDialogShow Triggered when the directory picker dialog is about to be shown. This event allows customization or handling just before the dialog appears.
OnLookupSelect Triggered when an item is selected in the lookup.
OnLookupIndexSelect Triggered when an index in the lookup list is selected.
OnLookupNeedData Used to supply additional data to the lookup mechanism, typically when more data is needed for the directory lookup.
OnLookupOpen Triggered when the lookup mechanism is opened.
OnLookupClose Triggered when the lookup mechanism is closed.