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: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

EditControl SetUnderline

Thread ID:





127464 Nov 17,2016 06:27 AM UTC Nov 18,2016 12:36 PM UTC WinForms 1
Tags: EditControl
Asked On November 17, 2016 06:27 AM UTC


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


Kannan R [Syncfusion]
Replied On 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. 


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