This project is read-only.

Intellisense in scintillaNET

Topics: Developer Forum, User Forum
Sep 5, 2013 at 2:32 AM
Is there a way to have my scintillaNET text editor use Intellisense much like in Visual Basic when writing code?
Sep 5, 2013 at 3:12 PM
Yes, it's called AutoComplete. There are plenty of examples and discussions related to this in the forum....

Sep 5, 2013 at 3:27 PM
I just can't seem to find a way to start this. Do I need to fill in the ListString? If so with what?
Sep 13, 2013 at 1:25 AM
BWSanders, do you still need help? I have a working IntelliSense system though along the way I discovered that there are quite a few oddities with the native Scintilla control.

Have you gotten the AutoComplete popup to show with your items? Please post your code and I will take a look.
Sep 17, 2013 at 1:55 PM
yes, i could definitely use a hand getting it set up. I believe i have autocomplete configured correctly but it's not really working out.
Sep 17, 2013 at 1:56 PM
i configured it through the properties of my scintilla text box. are you saying that I need or should be doing through code?
Sep 21, 2013 at 9:25 PM
I am old-school and always prefer to configure as much as possible through code. Here is how I did it:
            ImageList IL = new ImageList();
            IL.Images.Add(<insert your own images here>);
            this.scintilla.AutoComplete.RegisterImages(IL, System.Drawing.Color.Magenta);

            //Set autocomplete styles
            this.scintilla.AutoComplete.AutoHide = true;
            this.scintilla.AutoComplete.AutomaticLengthEntered = true;
            this.scintilla.AutoComplete.CancelAtStart = true;
            this.scintilla.AutoComplete.DropRestOfWord = false;
            this.scintilla.AutoComplete.ImageSeparator = '?';
            this.scintilla.AutoComplete.IsCaseSensitive = false;
            this.scintilla.AutoComplete.ListSeparator = ' ';
            this.scintilla.AutoComplete.MaxHeight = 5;
            this.scintilla.AutoComplete.MaxWidth = 0;
            this.scintilla.AutoComplete.SingleLineAccept = false;
            this.scintilla.AutoComplete.FillUpCharacters = " ";
Then, when you want to add an item with ImageIndex 0, do it like this:
            this.scintilla.AutoComplete.List.Add(<your item name here> + "?0");
Then, every time a CharAdded event fires, I start a timer to poll the Autocomplete listbox to check which item is selected. If the selected item is different from the previously selected item, I update my help pane to match that item.

Hope this will help!