Bug with Code Snippets and Autoindentation

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 } )

1 Reply

J. J.Nagarajan Syncfusion Team 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

Loader.
Up arrow icon