SimpleButton.ImageIndex Property

Gets or sets the index of the image displayed on the button.

Namespace: DevExpress.XtraEditors

Assembly: DevExpress.XtraEditors.v20.1.dll

Declaration

[Browsable(false)]
[DefaultValue(-1)]
[DXCategory("Appearance")]
[ImageList("ImageList")]
public virtual int ImageIndex { get; set; }
<Browsable(False)>
<DefaultValue(-1)>
<DXCategory("Appearance")>
<ImageList("ImageList")>
Public Overridable Property ImageIndex As Integer

Property Value

Type Default Description
Int32

-1

An integer value representing the zero-based index of the image displayed on the button.

Remarks

Once an image collection containing images is assigned to the button's SimpleButton.ImageList property, use the ImageIndex property to specify the index of the image which is to be displayed on the button.

The ImageIndex property is not reset when another image collection is assigned to the SimpleButton.ImageList property. If the ImageIndex property value points to a non-existent image, no image is displayed on the button.

The button's image can also be specified using the SimpleButton.Image property.

The ImageIndex property is equivalent to the ImageOptions.ImageIndex property (see SimpleButton.ImageOptions).

See Also