ComboBox icon selector

Hi,

I’m trying to change the icon’s size of a combobox component, but i can’t make it works. I’ve try with

.v-filterselect .v-icon but doesn’t work, any idea?

Thanks.

Strange, that selector should work just fine. Are you sure your custom theme gets loaded properly? Have you been able to change any other part of the theme successfully (e.g. fonts, backgrounds etc.)?

Yes, the theme is loaded properly, but maybe i’m wrong with some concepts of the combobox.

I’m not trying to change the item’s icon, i’m trying to change the combobox icon combobox.seticon(...)
The selector “v-filterselect .v-icon” works fine with item’s icon but not with combobox.setIcon. Anyway i can use item’s icon instead of combobox icon.

Thanks.

Okay, now I see.

The generic icon for the ComboBox is handled by its caption (and hence the layout), so the root selector for the actual combobox element will not affect (the icon is not inside the root element, but beside it in the dom).

You need to add a stylename for the combobox (generic to all comboboxes if you wish) and style the icon using that.

// Java
combo.addStyleName("foo");

// CSS
.v-caption-foo .v-icon {
   ...
   }

Ok, thanks Jouni, i’ll try that.