Windows Forms: Autocomplete RichTextBox in C#

This post shows you how to implement AutoComplete with RichTextBox using Autocomplete Menu library in C#.NET Windows Forms Application.

Drag the RichTextBox control from the visual studio toolbox to your windows forms application.

c# autocomplete richtextbox

Next, You make your richtextbox autocomplete you can use the AutocompleteMenu library. Open your Manage Nuget Packages from the visual studio, then install the AutoCompleteMenu-ScintillaNET.

Rebuild your project, then you can see the AutocompleteMenu control in your visual studio toolbox. Next, you need to drag the AutocompleteMenu control from your visual toolbox to your winform.

Click on the RichTextBox control, then set the AutocompleteMenu property to the autocompletemenu control. 

c# autocomplete menu

Next, you need to add items to the AutocompleteMenu control as shown above.