Click or drag to resize

PathEdit Class

The PathEdit is a simple component that allows the user to enter a path or to browse for it. The user can open a browse dialog by pressing the button on the right. Use the Path property to set a default path or the get the path that the user has finally chosen. Use The FolderMode property to define if the user should enter / browse for a path to a file or a folder.
Inheritance Hierarchy

Namespace: Jam.Shell
Assembly: ShellBrowser (in ShellBrowser.dll) Version: 7.2
Syntax
public class PathEdit : UserControl, INotifyPropertyChanged, 
	ISupportInitialize

The PathEdit type exposes the following members.

Constructors
 NameDescription
Public methodPathEdit Initializes a new instance of the PathEdit class.
Top
Properties
 NameDescription
Public propertyButton Gives access to the embedded Button.
Public propertyContextMenuStrip Get or set the contextmenu strip of the control.
(Overrides ControlContextMenuStrip)
Public propertyDefaultExt Gets or sets the default file name extension. Example: "txt"
Public propertyDialogTitle Change the window title of the browse dialog, that will be opened if the user pressed the browse button on the right.
Public propertyFileBrowserDialog Returns a reference to an OpenFileDialog
Public propertyFileFilter Edit your own filter options for the opendialog. Example: Image Files(*.BMP;*.JPG;*.GIF)|*.BMP;*.JPG;*.GIF|All files (*.*)|*.*
Public propertyFileNames Contains the selected files from the FileBrowserDialog.
Public propertyFocused Gets a value indicating whether the TextBox control has input focus.
Public propertyFolderBrowserDialog Returns a reference to a FolderBrowserDialog.
Public propertyFolderMode Use this property to select if the dialog for browsing for a file, or for a folder should be displayed.
Public propertyIsInitializing The value this property is true between the calls BeginInit() and EndInit() of the ISupportInitialize interface.
Public propertyIsValidPath Check if the selected file or folder is existing on your system at the moment.
Public propertyPath Use this property to get or set the path in the edit field.
Public propertyShellAutoCompletionMode This property controls the availability of the shells autocompletion mode, if set to FileSystem, Url or both, the PathEdit control provides autocompletion mode with a via a drop down box. If disabled the default behavior is used. Both, FileSystem and Url can be specified at once. FileSystem is enabled by default. Url needs to be used to also provide autocompletion for UNC-Paths.
Public propertyText Get or set the text visible in the editor.
(Overrides UserControl.Text)
Public propertyTextBox Gives access to the embedded TextBox.
Public propertyToolTip Sets the ToolTip text for the embedded TextBox.
Public propertyVersion The current version of the ShellBrowser.
Top
Methods
 NameDescription
Public methodBeginInitSignals the object that initialization is starting.
Protected methodBrowseForFile Internal method, which handles the browsing for files.
Protected methodBrowseForFolder Internal method, which handles the browsing for folders.
Public methodEndInitSignals the object that initialization is complete.
Public methodFocus Sets input focus to the TextBox control.
Protected methodOnChange Fires the Change event, when the text in the TextBox changes.
Protected methodOnCreateControlRaises the CreateControl event.
(Overrides UserControlOnCreateControl)
Protected methodOnFontChanged Raises the FontChanged event.
(Overrides ContainerControlOnFontChanged(EventArgs))
Protected methodOnResize Handles the resizing of PathEdit component.
(Overrides UserControlOnResize(EventArgs))
Top
Events
 NameDescription
Public eventBeforeShowDialog Occurs before a dialog for file/folder selection is shown after the button of the PathEdit control has been clicked.
Public eventButtonClick This event occurs if the button of the PathEdit control has been clicked.
Public eventChange Occurs when the Text in the TextBox changes.
Public eventEditFieldClick This event occurs if the user clicked on the editfield.
Public eventEditFieldEnter Occurs when the edit field is entered and gains focus
Public eventEditFieldKeyDown Occurs when a key is pressed while the edit field has focus
Public eventEditFieldKeyPress Occurs when a key is pressed while the edit field has focus
Public eventEditFieldKeyUp Occurs when a key is released while the edit field has focus
Public eventEditFieldLeave Occurs when the edit field is left and lost focus
Public eventPropertyChanged This event is issued if the TextField in the PathEdit changed. It is available here to be able to add a DataBinding to the Path.
Top
Extension Methods
 NameDescription
Public Extension MethodGetSelfAndDescendants Returns a flattened collection of a control and all of its descendant controls.
(Defined by ExtensionMethods)
Public Extension MethodHandleNeededA Control extension method that ensures that the handle for a control is created.
(Defined by ExtensionMethods)
Public Extension MethodScaledPixelsAn extension method for controls: It scales the passed pixels according to the current dpi the control is displayed with.
(Defined by ExtensionMethods)
Public Extension MethodScaleFontA Control extension method that scales font according to the passed factor.
(Defined by ExtensionMethods)
Top
See Also