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. Image for the cookie policy date
close icon

Problem in EditControl with text containing "\r"

 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

3 Replies

UN Unknown Syncfusion Team 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 



SM Steve McWilliams January 29, 2020 02:49 PM UTC

Thanks a lot. That worked.


UN Unknown Syncfusion Team 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 


Loader.
Live Chat Icon For mobile
Up arrow icon