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

Bug with Code Snippets and Autoindentation

Thread ID:

Created:

Updated:

Platform:

Replies:

69106 Oct 15,2007 12:40 PM UTC Oct 18,2007 12:03 AM UTC Windows Forms 1
loading
Tags: EditControl
Stéphane BLANC
Asked On October 15, 2007 12:40 PM UTC

Hi

To reproduce it, open the indentation guidelines demo.

Enter if, press tab
You will have the following display :

if (true)
{

}

instead of

if (true)
{

}

(there is a tab before { and } )

J.Nagarajan [Syncfusion]
Replied On October 18, 2007 12:03 AM UTC

Hi Stephane,

You can avoid this additional tab before the braces by adding the following code to your form's constructor. Please refer the below sample that demonstrates this.

[C#]

CodeSnippet snippet = this.editControl1.GetSnippetByTitle("if");
snippet.Code = snippet.Code.Replace("\n\t", "\n");


I have attached the sample for your reference.

http://websamples.syncfusion.com/samples/Edit/I38257/main.htm

Please let me know if you have any other questions.

Regards,
Nagaraj

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

;