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.v20.1.dll

Declaration

[DXCategory("Behavior")]
[DefaultValue(0)]
public virtual int ActionButtonIndex { get; set; }
<DXCategory("Behavior")>
<DefaultValue(0)>
Public Overridable Property ActionButtonIndex As Integer

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