Thanks for you response, Sharp. Sorry I was obtuse. Using your code,
what I would like to be able to do is something like this:
CurComboBox.Items.Clear()’clear the previous Items
For Each s In CurItems ‘s is an string CurItems is array of string
CurComboBox.Items.Add(s) ‘add item
If s.contains("a") then
CurComboBox.SelectedItem(s).Font.Italic
else
CurComboBox.SelectedItem(s).Font.Regular
end if
Next
OK, so I'm making some things up, but what I'm driving at is: If my
string contains an a, then I want that item in the ComboBox to be
italicized (or Bold, or a different Font, etc.). If it doesn't then
that element would be, whatever, not italic. Can I do this with
ComboBox? Of course SelectedItem(s).Font doesn't work. Is there
another way?
On Dec 19, 8:54 am, Sharp ArunKumar <[email protected]> wrote:
> Hai, Arpaket
> I can’t able to fully understand what you need any way
>
> See the following code for dynamically add item to combobox
>
> CurComboBox.Items.Clear()’clear the previous Items
> For Each s In CurItems ‘s is an string CurItems is array of string
> CurComboBox.Items.Add(s) ‘add item
> Next
> Do you want to occur the event when user select the item in combobox
> Then write in DropDown closed event
>
> On Dec 18, 11:16 pm, Arpaket <[email protected]> wrote:
>
> > Using VB.Net: I need to fill in a ComboBox with items that can be
> > highlighted according to their kind. Like BIG or small. Can I do
> > this with code dynamically in the ComboBox? If so, I don't know how
> > and sorry to be so stupid but you could help me. TIA.