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.
Syncfusion Feedback

Comment/Uncomment

Thread ID:

Created:

Updated:

Platform:

Replies:

50520 Oct 13,2006 01:20 AM UTC Oct 14,2006 08:46 AM UTC Windows Forms 1
loading
Tags: EditControl
Scott Swartz
Asked On October 13, 2006 01:20 AM UTC

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
LockWindowUpdate(this.editControl.Handle.ToInt64());
editControl.se
for (int i = 1; i <= this.editControl.PhysicalLineCount; i++)
{
this.editControl.InsertText(i, 1, "-- ");
}

//Resume Painting
LockWindowUpdate(0);

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

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.

Example:

For C# :



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

Sample

Please let me know if this meets your requirements.

Thanks for your patience.

Regards,
Manohari.R

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.

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

;