Skip to main content

DevExpress v24.2 Update — Your Feedback Matters

Our What's New in v24.2 webpage includes product-specific surveys. Your response to our survey questions will help us measure product satisfaction for features released in this major update and help us refine our plans for our next major release.

Take the survey Not interested

LayoutViewOptionsItemText.TextToControlDistance Property

Gets or sets the default distance between card fields’ text labels and corresponding edit boxes.

Namespace: DevExpress.XtraGrid.Views.Layout

Assembly: DevExpress.XtraGrid.v24.2.dll

NuGet Packages: DevExpress.Win.Grid, DevExpress.Win.Navigation

#Declaration

[DefaultValue(5)]
[XtraSerializableProperty]
public int TextToControlDistance { get; set; }

#Property Value

Type Default Description
Int32 5

An integer value that represents the distance between text labels and corresponding edit boxes

#Property Paths

You can access this nested property as listed below:

Object Type Path to TextToControlDistance
LayoutView
.OptionsItemText .TextToControlDistance

#Remarks

This property specifies the default distance between text labels and edit boxes within a card.

Each group within a card can override the TextToControlDistance property setting. To do this, set the group’s OptionsItemTextGroup.TextAlignMode property to AlignLocal, AutoSize or CustomSize and set a custom distance to the group’s OptionsItemTextGroup.TextToControlDistance property.

You can also override the distance between the text label and edit box for a specific card field. To do this, set the field’s LayoutControlItem.TextAlignMode property to to AutoSize or CustomSize, and then assign the required value to the field’s BaseLayoutItem.TextToControlDistance property (the field object can be accessed via the LayoutViewColumn.LayoutViewField property).

See Also