none
how to make google like search box in current list RRS feed

  • Question

  • Hi,

    I want to make  a google like search box in my current list  that whenever I type a letter,the items in my listbox will also change according to what letter or text I inputed in my search box or textbox,I have a code here that just bind the author.title and year property into the listbox and I don't know how to implement it to have a search box.

    by the way here's the code

    private void BindCurrentList()
    {
    
        Word.Application App = Globals.ThisAddIn.Application;
        Word.Document doc = App.ActiveDocument;
        Word.Sources sour = doc.Bibliography.Sources;
                
        string[] strItems = new string[sour.Count];
        for (int i = 1; i <= sour.Count; i++)
        {
            Word.Source ssour = sour[i];
            string tag = ssour.Tag; 
            strItems[i - 1] = ssour.Field["Author"] + "; " + ssour.Field["Title"] + " (" + ssour.Field["Year"] + ")";
    
            listBox1.DisplayMember = "Name";
            listBox1.ValueMember = "Tag";
            listBox1.Items.Add(new Test(strItems[i - 1], tag));
        }
    }
    

    Thank you

    More Power

    God Bless us all

    Thursday, January 30, 2014 1:11 AM

Answers

  • Hi IGnjmz,

    I found a similar thread about how to accomplish autocomplete text in listbox:

    autocomplete textbox on listbox  

    If this not helpfull, since the issue is more relate to Windows Form Contrl, I suggest you repost the thread to

    Windows Form General get more effective help.

    Best regards

    Fei


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Friday, January 31, 2014 4:34 AM
    Moderator