TX Text Control .NET for Windows Forms

RibbonListViewItemDropDown Class

Class|Introduced in 29.0
Namespace
TXTextControl.Windows.Forms.Ribbon
Package
TXTextControl.TextControl.WinForms.SDK from the private NuGet feed or Text Control Offline Packages
Assembly
TXTextControl.Windows.Forms.dll
Install
dotnet add package TXTextControl.TextControl.WinForms.SDK .NET 8 and later. For .NET Framework, reference TXTextControl.Windows.Forms.dll from the setup.

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.RibbonListViewItemDropDown

Examples

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.");

Members

Properties

PropertyDescription
ItemsGets or sets all items that are displayed when the drop-down menu is opened. The default value is an empty string array.
MinimumWidthGets or sets the minimum width, in 1/96 inch, of the displayed drop-down. The default value is 0.
SelectedIndexGets 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.
SelectedItemGets 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.
ShowCheckMarginGets 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.
ShowTextGets 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.
TextGets 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.