Hi
in my class i have a valid loaded CodeSnippetFolder object with one CodeSnippet inside. The shortcut of the CodeSnippet is "swi".
If i use following code and enter "swi" + TAB in the syntaxeditor only the console.writeline works and "swi" appears (the snippet is not inserted).
void syntaxEditor_KeyTyped(object sender, ActiproSoftware.SyntaxEditor.KeyTypedEventArgs e)
{
if (e.KeyData == Keys.Tab)
{
e.Cancel = this.syntaxEditor.IntelliPrompt.CodeSnippets.CheckForCodeSnippetShortcut(_snippetFolder);
Console.WriteLine(_snippetFolder.CodeSnippets[0].Shortcut);
}
}
The snippet works fine if i use
this.syntaxEditor.IntelliPrompt.CodeSnippets.ShowInsertSnippetPopup(this.syntaxEditor.Caret.Offset, "Insert snippet:", _snippetFolder, CodeSnippetTypes.Expansion);
What do i wrong?
[Modified 12 years ago]