public AutocompleteMenu(RichText tb) { // create a new popup and add the list view to it AutoClose = false; AutoSize = false; Margin = Padding.Empty; Padding = Padding.Empty; listView = new AutocompleteListView(tb); host = new ToolStripControlHost(listView); host.Margin = new Padding(2, 2, 2, 2); host.Padding = Padding.Empty; host.AutoSize = false; host.AutoToolTip = false; CalcSize(); base.Items.Add(host); listView.Parent = this; SearchPattern = @"[\w\.]"; MinFragmentLength = 2; }
public AutoCompleteMenu(FastColoredTextBox tb) { /* Create a new popup and add the list view to it */ AutoClose = false; AutoSize = false; Margin = Padding.Empty; Padding = Padding.Empty; BackColor = Color.White; ListView = new AutocompleteListView(tb); Host = new ToolStripControlHost(ListView) { Margin = new Padding(2, 2, 2, 2), Padding = Padding.Empty, AutoSize = false, AutoToolTip = false }; CalcSize(); base.Items.Add(Host); ListView.Parent = this; SearchPattern = @"[\w\.]"; MinFragmentLength = 2; }