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.


Thread ID:





50520 Oct 12,2006 09:20 PM Oct 14,2006 04:46 AM Windows Forms 1
Tags: EditControl
Scott Swartz
Asked On October 12, 2006 09:20 PM

I''d like to have toolbar buttons that comment and uncomment the selected text.

There is a editControl.CommentSelection() function but it doesn''t appear to do anything and the help for that method has zero details. I assume that I need to specify what I consider a comment to be (i.e., in C# it would be "//"), but I can''t figure out how to do that.

I also found the following code in one of their downloadable samples. If they hane comment and uncomment methods, I''m not sure why they have this code sample.

Any help would be appreciated. Thanks.

//Lock Painting
for (int i = 1; i <= this.editControl.PhysicalLineCount; i++)
this.editControl.InsertText(i, 1, "-- ");

//Resume Painting

Administrator [Syncfusion]
Replied On October 14, 2006 04:46 AM

Hi Scott,

Our apologies for the delayed response. For EditControl.CommentSelection method to work properly the StartComment attribute of ConfigLanguage tag of the language configuration definition has to be defined in the XML configuration file.


For C# :

I have attached a sample that illustrates this in this link given below.


Please let me know if this meets your requirements.

Thanks for your patience.



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.