Page 1 of 1
Combobox selection color
Posted: Thu Oct 27, 2022 8:36 pm
by Sergio Morais
Hi,
Any way to change the stock combobox item selection color?
The "Input Focus" color is customizable, however the item selection color remains blue. I have also attempted to change it by selecting another jQuery UI theme in the page properties -> style -> jQuery UI Theme settings box, but no joy...
Thanks,
Sergio
WWB 14.4.0
Re: Combobox selection color
Posted: Thu Oct 27, 2022 9:48 pm
by crispy68
Are you want to change the background of the combobox button, the background of the "dropdown" portion or the background of the selection bar in the dropdown? Changing the background color under the style tab affects both.
Re: Combobox selection color
Posted: Thu Oct 27, 2022 9:56 pm
by BaconFries
You can try/use the following placing between the <head></head> tags* change red to whatever colour you wish. Note if still using WB14 it is no longer supported.
Code: Select all
<style>
select option
{
background: red;
}
</style>
Re: Combobox selection color
Posted: Thu Oct 27, 2022 10:15 pm
by crispy68
Bacon beat me to it. This will style the background of the dropdown box.
However, when you hover over an item in the dropdown box, I don't believe there is a way to style the hover color without using javascript.
Re: Combobox selection color
Posted: Fri Oct 28, 2022 8:48 am
by Sergio Morais
Thanks for the input, guys.
Indeed, what I would like to change is precisely the hover selection bar.
The code Bacon sent works perfectly on the drop down background but not the hover dropdown item selection bar which is always blue.
That's what I would like to change. Keep the dropdown background white while having the item selection bar in green, for eg.
Is this available in WWB17? I have put upgrade on hold beacause whenever i upgrade I aalways end uo having to install every single non-stock extension (and there are quite a lot).
Regards,
Re: Combobox selection color
Posted: Fri Oct 28, 2022 9:22 am
by Pablo
Is this available in WWB17?
No, because there is no official way to do this in HTML/CSS.
https://developer.mozilla.org/en-US/doc ... g_with_css
As, alternative you can use the Listview object in 'drop list' mode.
Re: Combobox selection color
Posted: Fri Oct 28, 2022 10:05 am
by Sergio Morais
Thanks again guys,
The Listview alternative works for me.
Regards,