TextBox AutoCompleteStringCollection Suggest

后端 未结 2 1785
遥遥无期
遥遥无期 2021-01-21 14:18

I have created a form in C# with a CustomSource for a textbox:

public partial class FormLookup : Form
{

    AutoCompleteStringCollection source = new AutoComple         


        
2条回答
  •  醉话见心
    2021-01-21 15:13

    You need create your own component. The structure can be be:

    Panel (the main container with white background and border)
     |-> FlowLayoutPanel (the container for already added tags); Dock = Left
     |    |-> TagControl (you custom control for tag label)
     |    |-> ...        (more tags if required)
     |-> TextBox (the one with autocompletion with no borders); Dock = Fill;
    

    You can encapsulate to your own Control/UserControl and use that event from Toolbox in designer.

提交回复
热议问题