Change the background color multi select combo box in HTML

Asked By 10 points N/A Posted on -
qa-featured

Change the background color of the selected option, in a multi select combo box in HTML.

I am using a multi select box in my code.

If I select an option, it's background color changes to dark blue, which is I think the default color for Windows combo boxes. Is it possible to change the color of the selected option from dark blue to something else when I select it?

Best regards.

SHARE
Answered By 0 points N/A #118185

Change the background color multi select combo box in HTML

qa-featured

Hi Ahmadraza,

I did some research about this issue and this is what I found about the codes. Overrule the System Colors.  HighlightBrushKey (and SystemColors. HighlightTextKey if you want):

<ComboBox>

        <ComboBox.Resources>

                <SolidColorBrush x:Key="{x:Static SystemColors.HighlightBrushKey}">Red</SolidColorBrush>

        </ComboBox.Resources>

        <ComboBoxItem>One</ComboBoxItem>

        <ComboBoxItem>Two</ComboBoxItem>

</ComboBox>

Also you can try this site. After you try and if this was successful, please come and explain what did you use so if anyone has the same problem as this, I know which one of this I can offer to them. And I hope that these two would be successful in your work.

Thank you for your question and come back again.

Good luck.

Thanks.

Login/Register to Answer

Related Questions