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

EditControl SetUnderline


I would like to Underline based on the line number using the API SetUnderline. Can you provide a sample?


1 Reply

KR Kannan R Syncfusion Team November 18, 2016 12:36 PM UTC

Hi Muralidaran, 
Thank you for contacting Syncfusion support. 
This reported requirement can be achieved by using functions named SetUnderline, RemoveUnderline, SelectLine, ResetSelection in EditControl. Please make use of below code snippet to achieve this reported requirement. 
Code Snippet: [C#] 
// Select the line for which Underline needs to be added 
if (this.editControl1.Selection != null) 
   // To draw underline 
   this.editControl1.SetUnderline(this.editControl1.Selection.Top, this.editControl1.Selection.Bottom, format); 
// To remove the selection 
We have also prepared sample for this reported requirement and it can be downloaded from below location.  
Kindly check the above solution and let us know if it helps. 

Live Chat Icon For mobile
Up arrow icon