Introducing MPGH's AIGA. The latest advancement in artificial intelligence. Click here now to learn more!
Results 1 to 4 of 4
  1. #1
    polas6's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Posts
    22
    Reputation
    6
    Thanks
    0

    Cool Listbox item selection [solved]

    Hi,
    I have a small code and i want to highlight not only one found item in listbox
    but to highlight all items found under typed keywords.

    Example: i typed vb.net programming and i wanna to find it all keywords under these names and highlight only those sites and put those keywords in textbox2 from textbox1.

    I want like this:



    Here is the code.

    Code:
    For i = 0 To ListBox1.Items.Count - 1
    If ListBox1.Items(i).ToString.ToLower.Contains(Trim(LCase(TextBox1.Text))) Then
    ListBox1.SelectedIndex = i
    Exit For
    End If
    Next
    Thank you.

  2. #2
    Blubb1337's Avatar
    Join Date
    Sep 2009
    Gender
    male
    Location
    Germany
    Posts
    5,915
    Reputation
    161
    Thanks
    3,108
    I recommend using a listview over a listbox. It's more flexible.

    You can for example access the backcolor, font, forecolor etc.

    ListView1.Items(i).BackColor = Color.Blue



  3. #3
    polas6's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Posts
    22
    Reputation
    6
    Thanks
    0
    you have not understood what I wanted I know how to do it but it's not the same as the change is usually only text or background color.
    It's simple to do.
    But I need to make them highlight itself only typed keywords and found in listbox to move hightlighted Those sites with keywords from a listbox to textbox 2
    According to keywords typed in as TextBox1 and move to Them from a listbox textbox2 automatically from document completed.

    you have not understood what I wanted I know how to do it but it's not the same as the change is usually only text or background color.
    It's simple to do.
    But I need to make them highlight itself only typed keywords and found in listbox to move hightlighted Those sites with keywords from a listbox to textbox 2
    According to keywords typed in as TextBox1 and move to Them from a listbox textbox2 automatically from document completed.

    only unique related urls keywords as i typed to put like that in textbox2.
    Here is the example what i want.



    This is only urls from sites i'd like to put them in textbox2 like in the picture only unique urls related only with typed keywords.
    Last edited by polas6; 07-29-2011 at 07:48 AM.

  4. #4
    polas6's Avatar
    Join Date
    Jul 2011
    Gender
    male
    Posts
    22
    Reputation
    6
    Thanks
    0
    I do not need to put only keywords because the keywords it is only as example related with sites.com/programming.

    I need put it when i type in textbox1 keywords and find only unique urls and put only links with related keywords urls in textbox2.text

    Example: here is the listbox and thare are links in it and in the textbox2 put only unique links not keywords

    Maybe now it will be more clearly.

    I resolved it.
    Last edited by polas6; 07-29-2011 at 08:27 AM.

Similar Threads

  1. [Help]Add Listbox Items per line[Solved]
    By nathanael890 in forum Visual Basic Programming
    Replies: 12
    Last Post: 02-12-2011, 01:36 AM
  2. [Help]ListBox.Item.Selected[Solved]
    By hopefordope in forum Visual Basic Programming
    Replies: 6
    Last Post: 04-21-2010, 08:32 AM
  3. [Help]ComboBox Selection[Solved]
    By Invidus in forum Visual Basic Programming
    Replies: 12
    Last Post: 04-01-2010, 10:40 AM
  4. [Help] VB.NET 2008 - Saving ListBox Items in Settings
    By Samueldo in forum Visual Basic Programming
    Replies: 12
    Last Post: 03-17-2010, 09:14 PM
  5. [Help]ComboBox Selections[Solved]
    By ppl2pass in forum Visual Basic Programming
    Replies: 5
    Last Post: 03-15-2010, 02:29 PM