Back to Devexpress

RepositoryItemButtonEdit.TextEditStyle Property

windowsforms-devexpress-dot-xtraeditors-dot-repository-dot-repositoryitembuttonedit.md

latest8.1 KB
Original Source

RepositoryItemButtonEdit.TextEditStyle Property

Gets or sets the style in which text is displayed and edited in the button editor.

Namespace : DevExpress.XtraEditors.Repository

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DXCategory("Behavior")]
public virtual TextEditStyles TextEditStyle { get; set; }
vb
<DXCategory("Behavior")>
Public Overridable Property TextEditStyle As TextEditStyles

Property Value

TypeDefaultDescription
TextEditStylesStandard

The TextEditStyles value determining the editing style.

|

Available values:

NameDescription
Standard

A button editor works in its normal way. Editing and selecting text is allowed.

| | HideTextEditor |

The text editing region is not visible and the editor displays only buttons contained in the current button editor. If no buttons can be displayed (for instance because of setting the EditorButton.Visible property to False), the editor displays an empty region in this case.

| | DisableTextEditor |

A button editor is displayed in its normal way. However, editing and selecting text is not allowed. If you want to enable a user to select text but disable text modifications, you can set the text editing style to Standard and set the RepositoryItem.ReadOnly property to true.

|

The following code snippets (auto-collected from DevExpress Examples) contain references to the TextEditStyle 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.

XAF-how-to-add-an-unbound-column-to-gridlisteditor-to-execute-a-custom-action-for-a-record/CS/EFCore/ButtonInListEF/ButtonInListEF.Win/Controllers/SimpleBusinessActionGridListViewController.cs#L76

csharp
properties = new RepositoryItemButtonEdit();
properties.TextEditStyle = TextEditStyles.HideTextEditor;
properties.Click += buttonColumnColumnProperties_Click;

winforms-grid-custom-button-caption-customrowcelledit-event/CS/WindowsApplication1/Form1.cs#L26

csharp
RepositoryItemButtonEdit GetRepositoryItem(object value) {
    if (defaultRepositoryItemButtonEdit.TextEditStyle != DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor)
        return defaultRepositoryItemButtonEdit;

winforms-grid-display-icons-in-data-cells/CS/Form1.cs#L194

csharp
RepositoryItemButtonEdit buttonEdit = new RepositoryItemButtonEdit();
buttonEdit.TextEditStyle = TextEditStyles.DisableTextEditor;
buttonEdit.AllowHtmlDraw = DevExpress.Utils.DefaultBoolean.True;

create-a-federated-data-source-at-runtime/CS/FederationDataSourceExample/Form1.cs#L24

csharp
}
comboBoxEdit1.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
comboBoxEdit1.Properties.SelectedValueChanged += Properties_SelectedValueChanged;

winforms-dashboard-custom-items-extension/CS/CustomItemExtension/CustomItems/WebPageItem/WebPageItemExtensionModule.cs#L64

csharp
RepositoryItemButtonEdit buttonEdit = new RepositoryItemButtonEdit();
buttonEdit.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor;
buttonEdit.ButtonClick += ButtonEdit_ButtonClick;

winforms-grid-custom-button-caption-customrowcelledit-event/VB/WindowsApplication1/Form1.vb#L34

vb
Private Function GetRepositoryItem(ByVal value As Object) As RepositoryItemButtonEdit
    If defaultRepositoryItemButtonEdit.TextEditStyle <> DevExpress.XtraEditors.Controls.TextEditStyles.HideTextEditor Then Return defaultRepositoryItemButtonEdit
    'you can cache repository items as follows

winforms-grid-display-icons-in-data-cells/VB/Form1.vb#L174

vb
Dim buttonEdit As RepositoryItemButtonEdit = New RepositoryItemButtonEdit()
buttonEdit.TextEditStyle = TextEditStyles.DisableTextEditor
buttonEdit.AllowHtmlDraw = DevExpress.Utils.DefaultBoolean.True

create-a-federated-data-source-at-runtime/VB/FederationDataSourceExample/Form1.vb#L22

vb
Next method
comboBoxEdit1.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor
AddHandler comboBoxEdit1.Properties.SelectedValueChanged, AddressOf Properties_SelectedValueChanged

winforms-dashboard-custom-items-extension/VB/CustomItemExtension/CustomItems/WebPageItem/WebPageItemExtensionModule.vb#L73

vb
Dim buttonEdit As New RepositoryItemButtonEdit()
buttonEdit.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor
AddHandler buttonEdit.ButtonClick, AddressOf ButtonEdit_ButtonClick

See Also

ReadOnly

Buttons

ResetTextEditStyleToStandardInFilterControl

RepositoryItemButtonEdit Class

RepositoryItemButtonEdit Members

DevExpress.XtraEditors.Repository Namespace