Topics: User Forum
Jan 8, 2010 at 10:51 AM

I want to check whether there are any matches in the Autocomplete list. To do this, I kept a blank item in the beginning of the list. I want to only show the list if the current item is not the blank one. How do I do that?

Jan 8, 2010 at 1:34 PM

Have a look at my second Post in this Thread

Jan 8, 2010 at 4:08 PM

Not exactly what I wanted.

I have word-wrap running, but I don't want it to pop up if there are no matches!

Jan 8, 2010 at 4:24 PM

Unfortunately the way it's set up is to always show the list when AutoComplete.Show() is called even though this isn't default native Scintilla behavior. If you're building your own ScintillaNet from source open AutoComplete.cs and comment lines 110 and 111. The entire method should look like this

internal void Show(int lengthEntered, string list, bool dontSplit)
	//	We may have the auto-detect of lengthEntered. In which case
	//	look for the last word character as the start
	int le = lengthEntered;
	if (le < 0)
		le = getLengthEntered();

	NativeScintilla.AutoCShow(le, list);

	//	Now it may have been that the auto-detect lengthEntered
	//	caused to AutoCShow call to fail becuase no words matched
	//	the letters we autodetected. In this case just show the
	//	list with a 0 lengthEntered to make sure it will show
	//if (!IsActive && lengthEntered < 0)
	//	NativeScintilla.AutoCShow(0, list);
If you aren't building your own version you'll have to recreate the logic yourself in your own code.

Jan 8, 2010 at 5:05 PM

I'm not building from source unfortunately.

And that's why I wanted to know how you get the currently selected autoselect word/index.
Eg: If I had a list of "apple, ball, base, cat" and typed "b", how do I find out whether "ball" has been selected or "base"?

Jan 8, 2010 at 5:26 PM

Try the SelectedIndex or SelectedText Properties

Jan 12, 2010 at 2:57 PM

Thank you for the help. It worked great :D