Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27569

VS 2010 Change listbox part of text color for all items only part of them in vb.net

$
0
0
Hi,everybody

I have button find and listbox.

I would like to know how to change the color of text using listbox.
Only part of it I want to change color for the whole selected items homemade in a listbox and not the full row cuz i have urls in listbox.
I do not want to add these homemade items to listbox cuz i just want to change the color for selected or found items in listbox.


Example:

Code:

If ComboBox1.SelectedItem = "homemade" = True Then
            ListBox1.ForeColor = Color.Red
 End If

If ComboBox1.SelectedItem = "homemade 2" = True Then
            ListBox1.ForeColor = Color.Red
 End If

When select item from combobox after selected item from combobox i click on the button find and shoud mark with color only part of text for all items which contains homemade.

If i select another item from combobox it shoud mark with color for other selected item.
I do not know how else to explain to understand more clearly

but i think you should understand that.

Thanks in advance.

Viewing all articles
Browse latest Browse all 27569

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>