Quantcast
Channel: SharpDevelop Community
Viewing all articles
Browse latest Browse all 1764

AvalonEdit - how to get the words when input a dot ?

$
0
0

the  AvalonEdit example shows the code Completion, codes bellow

void textEditor_TextArea_TextEntered(object sender, TextCompositionEventArgs e)
{if (e.Text == ".") {// Open code completion after the user has pressed dot:
        completionWindow = new CompletionWindow(textEditor.TextArea);
        IList<ICompletionData> data = completionWindow.CompletionList.CompletionData;
        data.Add(new MyCompletionData("Item1"));
        data.Add(new MyCompletionData("Item2"));
        data.Add(new MyCompletionData("Item3"));
        completionWindow.Show();
        completionWindow.Closed += delegate {
            completionWindow = null;
        };
    }
}
and i want to know the words before the dot ,is there any idea?

 


Viewing all articles
Browse latest Browse all 1764

Trending Articles