We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: June 24, 2019).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Problem in EditControl with text containing "\r"

Thread ID:

Created:

Updated:

Platform:

Replies:

151026 Jan 28,2020 03:12 PM UTC Jan 30,2020 05:10 AM UTC WPF 3
loading
Tags: EditControl
Steve McWilliams
Asked On January 28, 2020 03:12 PM UTC

 In this demo the text box is preloaded with "first line \r second line \r", but the box only shows 1 line, you have to highlight the line to make it visible.
 Also the cursor is very tall, it is confusing which line is being edited. 

Attachment: EditControlReturnLineHeight_88c146b3.zip

Niranjan Kumar Gopalan [Syncfusion]
Replied On January 29, 2020 12:51 PM UTC

Hi Steve, 

Thanks for contacting Syncfusion support. 

We have analyzed the query  “When the text with new row is added , text is displayed on first line only in EditControl”. The required query can be achieved by assigning “\r” to SplitLinesRegex property in EditControl current langauges. This property creates the new line and adds the texts as show in below screenshot. Please refer the below code snippet for the same. 

C#: 
private void editControl1_Loaded_1(object sender, RoutedEventArgs e) 
        { 
            this.editControl1.CurrentLanguage.SplitLinesRegex = "\r"; 
            this.editControl1.Text = "Text \r TextT2 \r TextT3"; 
        } 

Screenshot: 
 

Regards, 
Niranjan Kumar 


Steve McWilliams
Replied On January 29, 2020 02:49 PM UTC

Thanks a lot. That worked.

Niranjan Kumar Gopalan [Syncfusion]
Replied On January 30, 2020 05:10 AM UTC

Hi Steve, 

Thanks for your update. 

We are glad to know that reported query has been resolved .We will be happy to assist you if you require further assistance in this query. 

Regards, 
Niranjan Kumar 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

Live Chat Icon For mobile
Live Chat Icon