ToolbarDropDownItemPicker Class
Implements a dropdown item picker custom toolbar item functionality.
Namespace: DevExpress.Web.ASPxHtmlEditor
Assembly: DevExpress.Web.ASPxHtmlEditor.v24.1.dll
NuGet Package: DevExpress.Web
Declaration
Remarks
The ToolbarDropDownItemPicker class allows you to provide the ASPxHtmlEditor toolbar with custom dropdown item picker items.
Properties provided by the ToolbarDropDownItemPicker class allow you to customize the item appearance and behavior.
- ToolbarDropDownItemPicker.Items. Use this collection to add items to a dropdown list.
- ToolbarDropDownItemPicker.ColumnCount. Use this property to specify the number of columns into which items are arranged within a dropdown list.
- ToolbarDropDownItemPicker.ItemHeight and ToolbarDropDownItemPicker.ItemWidth. Use these properties to adjust the item size. To specify the size of an items’ images, use the properties provided at the particular item level.
- ToolbarItemBase.Image property set. Allows you to define an image to be displayed in a dropdown item picker.
- ToolbarDropDownItemPicker.ImagePosition. You can display a caption and/or image within a list item. The element to display is determined automatically, based upon a list item’s ToolbarItemBase.Text and ImagePropertiesBase.Url property values. To customize a list item’s image alignment, use an item picker’s ToolbarDropDownItemPicker.ImagePosition property. In addition, a list item can be assigned a tooltip and value via the ToolbarItemBase.ToolTip and ToolbarCustomItem.Value properties, respectively.
- ToolbarDropDownItemPicker.CommandName. Use this property to associate a command name with an item picker. You can use this command name to respond to item picker clicks on the client side, via the editor’s ASPxClientHtmlEditor.CustomCommand client event handler.
ToolbarDropDownItemPicker.ClickMode. Use this property to specify the response to clicks on the dropdown item picker. The following options are available.
- ShowDropDown. Determines that a click on an item picker invokes a dropdown list with the available options.
- ExecuteAction. Specifies that a click on an item picker executes a command associated with it via its ToolbarDropDownItemPicker.CommandName property, and implemented using the editor’s ASPxClientHtmlEditor.CommandExecuted event.
- ExecuteSelectedItemAction. This value is used by default. It specifies that a click on an item picker executes an action associated with an item being currently selected within a dropdown list. In this mode, a toolbar button displays the recently selected item’s image or caption. This allows users to select this item by clicking the button, rather than opening a dropdown and selecting the item again. To specify the initially selected item, use an item picker’s ToolbarCustomDropDownBase.SelectedItemIndex property.
Note
When the ToolbarDropDownItemPicker.ClickMode property is set to ShowDropDown or ExecuteAction, the ToolbarDropDownItemPicker item displays an image, specified by the ToolbarItemBase.Image property.
When the ToolbarDropDownItemPicker.ClickMode property is set to ExecuteSelectedItemAction, the ToolbarItemBase.Image property is not in effect and the ToolbarDropDownItemPicker item displays an image of the currently selected item (ToolbarCustomDropDownBase.SelectedItemIndex).