This project is read-only.

Dynamic Custom AutoComplete

Topics: Developer Forum
Aug 2, 2012 at 10:52 PM


I am trying to figure out how to do a dynamic AutoComplete based on a list of static entries (like the XML approach) combined with a dynamic set of entires that are entered into the current document.

So if a user creates a new function or global variable, it should dynamically appear in the AutoComplete list.

According to the documentation I have to monitor every keystroke and implement it similar to the SciTEBase::CharAdded() function (although of course using the ScintillaNET equivalents.)

Is that the correct approach?

A simple yes or no, with any accompanying info would be greatly appreciated.

Thanks in advance!  --Jeff

Aug 6, 2012 at 6:36 PM

If you want to remove as well as add (e.g. user deletes a function) you'll want to listen to the DocumentChange event. The Autocomplete list will be populated at first by the XML config but you can add/remove items through scintilla.AutoComplete.List

Aug 6, 2012 at 8:05 PM

Cool.  That's exactly what I needed.  Thanks!