Property CodeCompletionChars
CodeCompletionChars
Gets or sets a collection of characters that initializes a code completion procedure when typing.
public virtual char[] CodeCompletionChars { get; set; }
Property Value
- char[]
Examples
Here is how to use a CodeCompletionChars in the C# code:
using Alternet.Syntax;
using Alternet.Editor;
using System.Collections.Generic;
public partial class Form1 : Form
{
private void Form1_Load(object sender, EventArgs e)
{
var parser = new SyntaxParser();
var edit = new SyntaxEdit();
edit.Parent = this;
edit.Lexer = parser;
parser.CodeCompletionChars = ".(<>,{[\"'/abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ= ".ToCharArray();
string fileName = "myfile.cs";
if (System.IO.File.Exists(fileName))
{
parser.FileName = fileName;
edit.LoadFile(fileName);
}
}
}
Here is how to use a CodeCompletionChars in the Visual Basic code:
Imports Alternet.Syntax
Imports Alternet.Editor
Imports System.Collections.Generic
Imports System
Partial Public Class Form1
Inherits Form
Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs)
Dim parser = New SyntaxParser()
Dim edit = New SyntaxEdit()
edit.Parent = Me
edit.Lexer = parser
parser.CodeCompletionChars = ".(<>,{[""'/abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ= ".ToCharArray()
Dim fileName As String = "myfile.cs"
If System.IO.File.Exists(fileName) Then
parser.FileName = fileName
edit.LoadFile(fileName)
End If
End Sub
End Class
Remarks
Code snippets are ready-made snippets of code you can quickly insert into the text. You can load snippets from the external file.