RibbonListViewItemDropDown Class
- Namespace
TXTextControl.Windows. Forms. Ribbon
- Package
TXTextControl.from the private NuGet feed or Text Control Offline PackagesTextControl. WinForms. SDK
- Assembly
TXTextControl.Windows. Forms. dll
- Install
dotnet add package TXTextControl..NET 8 and later. For .NET Framework, referenceTextControl. WinForms. SDK TXTextControl.from the setup.Windows. Forms. dll
Description
The RibbonListViewItemDropDown class provides properties to modify the settings of the drop-down menu, that is displayed for each RibbonListViewItem when the RibbonListView.ViewMode property includes the ListViewMode.DropDown enumeration.
Syntax
public class RibbonListView.RibbonListViewItemDropDownPublic Class RibbonListView.RibbonListViewItemDropDownExamples
The following example includes the items value from a Ribbon List View Item Drop Down object in application diagnostics. The created object is then available to the surrounding document workflow.
Console.WriteLine($"Items: {ribbonListViewItemDropDown.Items}");
Console.WriteLine("Ribbon List View Item Drop Down is ready for use.");Console.WriteLine($"Items: {ribbonListViewItemDropDown.Items}")
Console.WriteLine("Ribbon List View Item Drop Down is ready for use.")Members
Properties
| Property | Description |
|---|---|
| Items | Gets or sets all items that are displayed when the drop-down menu is opened. The default value is an empty string array. |
| MinimumWidth | Gets or sets the minimum width, in 1/96 inch, of the displayed drop-down. The default value is 0. |
| SelectedIndex | Gets or sets the index of the currently selected drop-down item. Setting -1 deselects the current selected drop-down item. If the RibbonListViewItemDropDown.ShowCheckMargin property is set to true, the corresponding item of the drop-down menu is checked when it is opened . If the RibbonListViewItemDropDown.ShowText property is set to true, setting this property updates the RibbonListViewItemDropDown.Text property with the text of the corresponding RibbonListViewItemDropDown.SelectedItem property value. The default value is -1. |
| SelectedItem | Gets or sets the current selected drop-down item. If the RibbonListViewItemDropDown.ShowCheckMargin property is set to true, the corresponding item of the drop-down menu is checked when it is opened . Setting null or a string that is not part of the RibbonListViewItemDropDown.Items string array deselects the current selected drop-down item. If the RibbonListViewItemDropDown.ShowText property is set to true, setting this property updates the RibbonListViewItemDropDown.Text property with the same value. The default value is null. |
| ShowCheckMargin | Gets or sets a value indicating whether space for a check mark is shown on the left edge of the drop-down menu. The default value is false. |
| ShowText | Gets or sets a value indicating whether the value of the RibbonListViewItemDropDown.Text property is displayed to the left of the drop-down button. The default value is true. |
| Text | Gets or sets the text that is displayed to the left of the drop-down button, if the RibbonListViewItemDropDown.ShowText property is set to true. The default value is an empty string. |