C# -- C++ Intellisense textbox
Is there a way to make a textbox control di开发者_C百科splay C++ intelisense just like it would in Visual Studios?
See This Question and this 'DIY Intellisense' Code Project from the top answer. That's in C#, but the same set of controls is accessable through C++.
I assume you are talking about embedding a control in your own app. You could look at Actipro SyntaxEditor. It will color the C++ right out of the box. If you want intelliprompt/sense you will have supply a parser. They have stuff to help you get started.
I gather you are talking about an AutoComplete popup, not actual intellisense.
To do this, set the AutoCompleteMode of the textbox to Suggest (or SuggestAppend) and choose the appropriate AutoCompleteSource
combDogBreeds.AutoCompleteMode = AutoCompleteMode.SuggestAppend;
combDogBreeds.AutoCompleteSource = AutoCompleteSource.ListItems;
string[] validDogBreeds = new[] {"Bull Mastiff", "Bulldog", "Golden Retriever"};
combDogBreeds.Items.AddRange(validDogBreeds);
Or, in the designer:
精彩评论