Click or drag to resize

ShellComboBox Class

The ShellComboBox is a simple component that allows to display folders and drives in a combo box with its associated icons. It is perfectly analogous to the windows explorer file selection dropdown list and provides an editable field as well.
Inheritance Hierarchy

Namespace:  Jam.Shell
Assembly:  ShellBrowser (in ShellBrowser.dll) Version: 7.1
Syntax
public class ShellComboBox : CustomFolderComboBox, 
	IShellControl, IShellControlConnectorTarget, ISupportInitialize, ISupportInitializeNotification

The ShellComboBox type exposes the following members.

Constructors
  NameDescription
Public methodShellComboBox
Default constructor of the ShellComboBox
Top
Properties
  NameDescription
Public propertyAutomaticRefresh
Enables the automatic refreshes of the control, e.g. when a file is added or deleted in the current directory.
Public propertyCurrentFolderIdList
Get or set the ItemIdList of the currently selected folder, returns null if nothing is selected, may not be explicitly set to null.
Public propertyDrawMode
DrawMode must always be OwnerDrawFixed for the ShellCombo to work.
Public propertyDropDownStyle
If DropDownStyle is DropDown, the shell autocompletion mode is enabled. If it is DropDownList, the shell autocompletion is disabled, ie. no edit field is provided. The default value is DropDown. ComboBoxStyle.Simple is not supported and ignored.
Protected propertyDropDownWidthAutoAdjust
Gets or sets a value indicating whether the combobox should adjust the width of the dropdown menu. The default value is true (In contrast to the default ComboBox which does not support this)
Public propertyFileSystemOnly
If this option is set to true, the ShellCombo will only show items of the filesystem and exclude virtual file items.
Public propertyFont
Gets or sets the font of the text displayed by the control and adapts UseSystemFont is set to false.
(Inherited from CustomEditComboBox.)
Public propertyIsInitialized
Gets a value indicating whether the component is initialized.
(Inherited from CustomEditComboBox.)
Public propertyItems
Gets an object representing the content of the CustomFolderComboBox
Public propertyNoFillOnStartup
If set to true the ShellCombo will not scan the filesystem and fill on startup, this is useful if the path to show is known only on runtime.
Protected propertyOverlayTextBox
Provides access to the TextBox field of the control.
(Inherited from CustomEditComboBox.)
Public propertySelectedPath
Use this property to get or set the currently selected path the ShellCombo is displaying. The path may be empty if the user selected an object that does not belong to the filesystem (i.e. Network). If you'd like to also handle these virtual file items, consider using the CurrentFolderIdList property instead.
Public propertyShellAutoCompletionMode
This property controls the availability of the shells autocompletion mode, if set to FileSystem, Url or both, the ComboBox provides a TextField the user can type to. If disabled the default combobox behavior without editing functionality is used. Both, FileSystem and Url can be specified at once and are enabled by default. ShellAutoComplete.Url needs to be used to also provide autocompletion for UNC-Paths.
(Inherited from CustomEditComboBox.)
Protected propertyShellBrowser
A ShellBrowser instance that is used to navigate through the files.
Public propertyShellControlConnector
Connects this control to a ShellControlConnector component, which allows to synchronize several shell controls.
Public propertyShowDesktopContent
If set to true, the ShellComboBox includes the first level of content of the Desktop folder.
Public propertyShowDrives
If set to true, the ShellComboBox includes the Drives installed in the System.
Public propertyShowFullPath
If set to true, the full path of the selected item is shown in the combobox
(Inherited from CustomFolderComboBox.)
Public propertyShowMyDocuments
If set to true, the ShellComboBox includes the files in the first level of the "My Documents" folder.
Public propertyShowNethood
If set to true, the Nethood is shown in the ShellCombo.
Public propertyShowNetwork
If set to true, the Network is shown in the ShellCombo.
Public propertyShowRecycleBin
If set to true, the ShellCombo will show the Recycle Bin icon.
Public propertyUseSystemFont
Set this property to true if you want the component to utilize the default system font. It is also set to true if the UseSystemStyles property is set.
(Inherited from CustomEditComboBox.)
Public propertyUseSystemStyles
Use this property to turn on or off the usage of the system specific design, i.e. enable Vista visual styles of the explorer components.
(Inherited from CustomEditComboBox.)
Public propertyVersion
The current version of the ShellBrowser.
Top
Methods
  NameDescription
Public methodAddDesktopContent
Adds the Desktop content if ShowDesktopContent is true
Protected methodAddIdListToCombo(ItemIdList)
Adds the folders of the given ItemIdList as non-persistent items to the combobox.
Protected methodAddIdListToCombo(ItemIdList, Boolean)
Adds the folders of the given ItemIdList as (non)persistent items to the combobox.
Public methodAddPersistentRootItemDesktop
This adds the persistent root item for the virtual folder "Desktop"
Protected methodAddShellFolder
This method adds a list of persistent objects from a folder to the CustomFolderBox.
Protected methodAdjustTextBoxSize
Adjusts the size of the edit field so that it is inside the combo box.
(Inherited from CustomEditComboBox.)
Public methodBeginInit
Signals the object that initialization is starting.
(Overrides CustomEditComboBoxBeginInit.)
Protected methodCustomFolderComboDrawItemHandler
This is the event handler registered to DrawItem(Control, DrawItemEventArgs, Boolean) it displays the items as files or folders
(Inherited from CustomFolderComboBox.)
Protected methodCustomFolderComboSelectedIndexChanged
The event handler for the SelectedIndexChanged event. it notifies the ShellControlConnector about the selection change if it has been registered.
Public methodEnableSystemStyles
Sets system specific behaviour, i.e. FullRowSelect in Vista and upwards.
(Inherited from CustomEditComboBox.)
Public methodEndInit
Signals the object that initialization is complete.
(Overrides CustomEditComboBoxEndInit.)
Public methodFolderChanged
Change the current folder to the one given in parameter throws ArgumentNullException if the argument was null
Public methodFullRefresh
Rescans the folders and refreshes the components' entire display
Protected methodGetPersistentItems
This method is extended by RefreshPersistent to support more Special Folders to be displayed.
Public methodGoUp
Go up one level in the tree, does nothing if the SelectedNode is null of if the SelectedNode has no Parent (is root)
Protected methodOnCreateControl (Inherited from CustomEditComboBox.)
Protected methodOnDropDown
Refreshes the non-persistent items in the control (ie. if changes on the desktop occurred)
(Overrides ComboBoxOnDropDown(EventArgs).)
Protected methodOnHandleCreated
This event is triggered after the handle of the control was created.
(Inherited from CustomEditComboBox.)
Protected methodOnOverlayResize
This method is called from the OverlayTextBox.Resize Event. It calls the AdjusTextBoxSize method.
(Inherited from CustomEditComboBox.)
Protected methodOnShowOptionChanged
This method needs to be called if a a ShowOption changed.
(Inherited from CustomFolderComboBox.)
Protected methodOnSizeChanged
This event is triggered after the size of the combobox changed. Fixes bug #4397.
(Inherited from CustomEditComboBox.)
Protected methodOverlayTextBoxClicked
If the OverlayTextBox is clicked, it's text is selected.
Protected methodOverlayTextBoxEntered
If the OverlayTextBox is clicked, it's text is selected.
Public methodRefresh(RefreshLevel)
This method indicates that the control should perform a refresh of its contents.
Public methodRefresh(RefreshLevel, ItemIdList)
This method indicates that the control should perform a refresh of its contents.
Protected methodRefreshPersistent
This method also refreshes the persistent items - it is used if properties that are normally set at designtime are modified at runtime, e.g. IncludeRemoveableDrives is switched on, since those Items are persistent items, they are not refreshed by default
Protected methodRemoveNonPersistentItems
Removes Items from the ShellComboItems list that are not persistent.
Public methodSelectedFileChange
This method does nothing because ShellCombo does not display files.
Protected methodSetFont
Sets the font without adjusting other properties.
(Inherited from CustomEditComboBox.)
Public methodSmartRefresh
The SmartRefresh only refreshes the non persistent items but its functionality equals a FullRefresh for the ShellCombo.
Protected methodUpdateOverlayTextBox
Updates the Text of the OverlayTextBox by either setting the items caption or the items path depending on the ShowFullPath property
(Inherited from CustomFolderComboBox.)
Top
Events
  NameDescription
Public eventInitialized
Occurs when initialization of the component is completed.
(Inherited from CustomEditComboBox.)
Public eventShowOptionChangedEvent
Register to this event to get informed about an optionchange of the Show{...} properties.
(Inherited from CustomFolderComboBox.)
Top
Extension Methods
  NameDescription
Public Extension MethodHandleNeeded
A Control extension method that ensures that the handle for a control is created.
(Defined by ExtensionMethods.)
Public Extension MethodScaledPixels
An extension method for controls: It scales the passed pixels according to the current dpi the control is displayed with.
(Defined by ExtensionMethods.)
Public Extension MethodScaleFont
A Control extension method that scales font according to the passed factor.
(Defined by ExtensionMethods.)
Top
See Also