Skip to main content

RepositoryItemPopupBase.ActionButtonIndex Property

Gets or sets a value specifying which editor button will open the editor’s dropdown window.

Namespace: DevExpress.XtraEditors.Repository

Assembly: DevExpress.XtraEditors.v23.2.dll

NuGet Package: DevExpress.Win.Navigation

Declaration

[DefaultValue(0)]
[DXCategory("Behavior")]
public virtual int ActionButtonIndex { get; set; }

Property Value

Type Default Description
Int32 0

A zero-based integer specifying the button by its index within the RepositoryItemButtonEdit.Buttons collection.

Remarks

By default, a PopupBaseEdit descendant contains a single button, which when clicked, invokes or hides the dropdown window. You can add your own custom buttons to the RepositoryItemButtonEdit.Buttons collection. In this case use the ActionButtonIndex property to specify which button should invoke or close the dropdown window when clicked.

Note

The ActionButtonIndex property cannot have negative values or exceed the last available button index. So, there will always be an action button unless you remove all the buttons from the collection, or alternatively, set the action button’s EditorButton.Visible property to false.

To open a dropdown window in code, rather than via an action button, use the PopupBaseEdit.ShowPopup method. End-users can open the dropdown window by clicking (in specific mode) or double-clicking the edit box (see RepositoryItemPopupBase.ShowDropDown). In addition, there is the option to open the dropdown from the keyboard (see RepositoryItemPopupBase.CloseUpKey).

See Also