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.
Unfortunately, activation email could not send to your email. Please try again.

EditControl SetUnderline

Thread ID:

Created:

Updated:

Platform:

Replies:

127464 Nov 17,2016 01:27 AM Nov 18,2016 07:36 AM Windows Forms 1
loading
Tags: EditControl
Muralidaran
Asked On November 17, 2016 01:27 AM

Hi,

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

Thanks,
Muralidaran

Kannan R [Syncfusion]
Replied On November 18, 2016 07:36 AM

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 
this.editControl1.SelectLine(this.editControl1.CurrentLine); 
if (this.editControl1.Selection != null) 
{ 
   // To draw underline 
   this.editControl1.SetUnderline(this.editControl1.Selection.Top, this.editControl1.Selection.Bottom, format); 
} 
// To remove the selection 
this.editControl1.ResetSelection(); 
 
 
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. 
 
Regards 
Kannan 


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.

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.

;