Back to Devexpress

TextEdit.Text Property

windowsforms-devexpress-dot-xtraeditors-dot-textedit-419f13b7.md

latest6.6 KB
Original Source

TextEdit.Text Property

Gets or sets the text displayed in the edit box.

Namespace : DevExpress.XtraEditors

Assembly : DevExpress.XtraEditors.v25.2.dll

NuGet Package : DevExpress.Win.Navigation

Declaration

csharp
[DXCategory("Appearance")]
[Bindable(true)]
[Browsable(true)]
public override string Text { get; set; }
vb
<DXCategory("Appearance")>
<Bindable(True)>
<Browsable(True)>
Public Overrides Property Text As String

Property Value

TypeDescription
String

A String value which specifies the editor’s text.

|

Remarks

The Text property’s value is the text actually displayed by the editor.

Setting this property to a new value raises the BaseEdit.ParseEditValue event so that you can manually specify how the assigned value should be converted to the actual edit value. The BaseEdit.EditValueChanging event (which is raised before the actual edit value is changed) can be used to prevent the editor from changing its value. After the actual edit value has been changed the BaseEdit.EditValueChanged event is raised.

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

report-server-how-to-manage-scheduled-jobs-from-a-windows-forms-application/CS/ScheduledTasksAPIClientDemo/SchedulerJobResultsForm.cs#L24

csharp
this.scheduledJobId = scheduledJobId;
this.id.Text = string.Format("{0}", scheduledJobId);
this.scheduledJobName.Text = scheduledJobName;

spreadsheet-document-api-use-worksheet-data-bindings-to-process-data/CS/PerformanceCounterCorrelationExample/Form1.cs#L21

csharp
string processName = Process.GetCurrentProcess().ProcessName;
this.textEditCategory1.Text = "Process";
this.textEditCounter1.Text = "Private Bytes";

winforms-scheduler-print-appointments-using-reports/CS/PrintingViaReports/MyAppointmentEditForm.cs#L174

csharp
try {
    txSubject.Text = controller.Subject;
    edStatus.Status = Appointments.Statuses.GetById(controller.StatusKey);

winforms-document-manager-web-browser-ui/CS/MyBrowser.cs#L40

csharp
if (e.KeyCode == Keys.Enter)
        LoadNewDocument(buttonEdit1.Text);
}

winforms-scheduler-custom-appointment-edit-form/CS/SchedulerDbExample/CustomAppointmentForm.cs#L94

csharp
if (appointment.CustomFields["Contacts"] == null)
    mxContacts.Text = "";
else {

report-server-how-to-manage-scheduled-jobs-from-a-windows-forms-application/VB/ScheduledTasksAPIClientDemo/SchedulerJobResultsForm.vb#L26

vb
Me.scheduledJobId = scheduledJobId
Me.id.Text = String.Format("{0}", scheduledJobId)
Me.scheduledJobName.Text = scheduledJobName

spreadsheet-document-api-use-worksheet-data-bindings-to-process-data/VB/PerformanceCounterCorrelationExample/Form1.vb#L28

vb
Dim processName As String = Process.GetCurrentProcess().ProcessName
textEditCategory1.Text = "Process"
textEditCounter1.Text = "Private Bytes"

winforms-scheduler-print-appointments-using-reports/VB/PrintingViaReports/MyAppointmentEditForm.vb#L194

vb
Try
    txSubject.Text = controller.Subject
    edStatus.Status = Appointments.Statuses.GetById(controller.StatusKey)

winforms-document-manager-web-browser-ui/VB/MyBrowser.vb#L34

vb
Private Sub buttonEdit1_KeyDown(ByVal sender As Object, ByVal e As KeyEventArgs)
    If e.KeyCode = Keys.Enter Then LoadNewDocument(buttonEdit1.Text)
End Sub

winforms-dashboard-custom-items-extension/VB/CustomItemExtension/CustomItems/WebPageItem/UriEditForm.vb#L9

vb
Get
    Return teUriPattern.Text
End Get

See Also

TextEdit Class

TextEdit Members

DevExpress.XtraEditors Namespace