Back to Devexpress

EditorButton.IsLeft Property

windowsforms-devexpress-dot-xtraeditors-dot-controls-dot-editorbutton-18d79201.md

latest3.5 KB
Original Source

EditorButton.IsLeft Property

Gets or sets the location of the button within the current ButtonEdit control.

Namespace : DevExpress.XtraEditors.Controls

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DefaultValue(false)]
[DXCategory("Layout")]
public virtual bool IsLeft { get; set; }
vb
<DefaultValue(False)>
<DXCategory("Layout")>
Public Overridable Property IsLeft As Boolean

Property Value

TypeDefaultDescription
Booleanfalse

true if the button is aligned to the left; false if the button is aligned to the right.

|

Remarks

It is possible to align an editor button either to the left or to the right. Set the IsLeft property to true to make the button aligned to the left. Otherwise, the button is stuck to the right edge of the current ButtonEdit control.

The following screenshots show two button edit controls with one button. The button’s IsLeft property is set to false and true respectively.

IsLeft property valueImage
false
true

When the IsLeft property value is changed, the button’s EditorButton.Changed event is fired.

The following code snippet (auto-collected from DevExpress Examples) contains a reference to the IsLeft property.

Note

The algorithm used to collect these code examples remains a work in progress. Accordingly, the links and snippets below may produce inaccurate results. If you encounter an issue with code examples below, please use the feedback form on this page to report the issue.

winforms-grid-find-row-by-display-text/CS/WindowsApplication1/GridViewSearch.cs#L77

csharp
{
    FocusNextRow(!e.Button.IsLeft);
}

winforms-grid-find-row-by-display-text/VB/WindowsApplication1/GridViewSearch.vb#L76

vb
Private Sub buttonEdit1_ButtonClick(ByVal sender As Object, ByVal e As DevExpress.XtraEditors.Controls.ButtonPressedEventArgs)
    FocusNextRow(Not e.Button.IsLeft)
End Sub

See Also

Changed

EditorButton Class

EditorButton Members

DevExpress.XtraEditors.Controls Namespace