# Listbox selected row colour

**URL:** <https://forum.xojo.com/t/listbox-selected-row-colour/17384>\
**Category:** Web\
**Created:** [June 19, 2014, 1:31pm UTC](https://forum.xojo.com/t/listbox-selected-row-colour/17384 "2014-06-19T13:31:48Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![Kevin\_Russell](https://forum.xojo.com/letter_avatar_proxy/v4/letter/k/a6a055/32.png) [@Kevin\_Russell](https://forum.xojo.com/u/Kevin_Russell)\
**Post date:** [June 19, 2014, 1:31pm UTC](https://forum.xojo.com/t/listbox-selected-row-colour/17384/1 "2014-06-19T13:31:48Z")

</div>

Is there any way to change the colour of the selected row within a web listbox from the default blue to match with other styles?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![Jan-Ole\_Berger](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/6f9a4e/32.png) [@Jan-Ole\_Berger](https://forum.xojo.com/u/Jan-Ole_Berger)\
**Post date:** [June 19, 2014, 1:46pm UTC](https://forum.xojo.com/t/listbox-selected-row-colour/17384/2 "2014-06-19T13:46:08Z")

</div>

AFAIK there is only one way with WCC ([http://webcustomcontrols.com/](http://webcustomcontrols.com/))

---

<div class="post-metadata">

**Author:** ![Kevin\_Russell](https://forum.xojo.com/letter_avatar_proxy/v4/letter/k/a6a055/32.png) [@Kevin\_Russell](https://forum.xojo.com/u/Kevin_Russell)\
**Post date:** [June 19, 2014, 2:35pm UTC](https://forum.xojo.com/t/listbox-selected-row-colour/17384/3 "2014-06-19T14:35:44Z")

</div>

Thanks Jan-Ole it looks like Daniel has something in the pipeline. [https://forum.xojo.com/10390-weblistbox-row-highlight-color/0#p74075](https://forum.xojo.com/10390-weblistbox-row-highlight-color/0#p74075)

---

<div class="post-metadata">

**Author:** ![Jan-Ole\_Berger](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/6f9a4e/32.png) [@Jan-Ole\_Berger](https://forum.xojo.com/u/Jan-Ole_Berger)\
**Post date:** [June 19, 2014, 2:38pm UTC](https://forum.xojo.com/t/listbox-selected-row-colour/17384/4 "2014-06-19T14:38:33Z")

</div>

There you go 😉

---

<div class="post-metadata">

**Author:** ![Greg\_O\_Lone](https://forum.xojo.com/user_avatar/forum.xojo.com/greg_o_lone/32/49_2.png) [@Greg\_O\_Lone](https://forum.xojo.com/u/Greg_O_Lone)\
**Post date:** [June 19, 2014, 3:17pm UTC](https://forum.xojo.com/t/listbox-selected-row-colour/17384/5 "2014-06-19T15:17:10Z")

</div>

It’s coming… \<[https://xojo.com/issue/22898](https://xojo.com/issue/22898)\>

---

<div class="post-metadata">

**Author:** ![Nathan\_Wright](https://forum.xojo.com/user_avatar/forum.xojo.com/nathan_wright/32/575_2.png) [@Nathan\_Wright](https://forum.xojo.com/u/Nathan_Wright)\
**Post date:** [June 19, 2014, 8:22pm UTC](https://forum.xojo.com/t/listbox-selected-row-colour/17384/6 "2014-06-19T20:22:53Z")

</div>

I dont understand why everyone has such a bit issue with changing the listbox select colour, simply add the following to your HTML Header and change the colour to be what you want the select colour to be.

`<style>
div.listbox tr.selected td div
{
color: #0B6121 !important;
}
</style>`

---

<div class="post-metadata">

**Author:** ![Nathan\_Wright](https://forum.xojo.com/user_avatar/forum.xojo.com/nathan_wright/32/575_2.png) [@Nathan\_Wright](https://forum.xojo.com/u/Nathan_Wright)\
**Post date:** [June 19, 2014, 8:23pm UTC](https://forum.xojo.com/t/listbox-selected-row-colour/17384/7 "2014-06-19T20:23:40Z")

</div>

You can also use the above with a small tweak to have a hover colour as well.

---

<div class="post-metadata">

**Author:** ![Jan-Ole\_Berger](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/6f9a4e/32.png) [@Jan-Ole\_Berger](https://forum.xojo.com/u/Jan-Ole_Berger)\
**Post date:** [June 20, 2014, 7:38am UTC](https://forum.xojo.com/t/listbox-selected-row-colour/17384/8 "2014-06-20T07:38:15Z")

</div>

Well but you maybe dont want to have all of them with the same color? And you cant manage it with Javascript/CSS because the IDs are dynamically generated.

---

<div class="post-metadata">

**Author:** ![Kevin\_Russell](https://forum.xojo.com/letter_avatar_proxy/v4/letter/k/a6a055/32.png) [@Kevin\_Russell](https://forum.xojo.com/u/Kevin_Russell)\
**Post date:** [June 20, 2014, 7:46am UTC](https://forum.xojo.com/t/listbox-selected-row-colour/17384/9 "2014-06-20T07:46:16Z")

</div>

Thanks Nathan that should work as a global setting.

I look forward to see how it is implemented within Xojo because it will be more granular with different properties as per style/colour selected at each instance of the listbox. Hopefully included in the next release. (Greg?)

---

<div class="post-metadata">

**Author:** ![Nathan\_Wright](https://forum.xojo.com/user_avatar/forum.xojo.com/nathan_wright/32/575_2.png) [@Nathan\_Wright](https://forum.xojo.com/u/Nathan_Wright)\
**Post date:** [June 20, 2014, 7:51am UTC](https://forum.xojo.com/t/listbox-selected-row-colour/17384/10 "2014-06-20T07:51:10Z")

</div>

> [@102411:@Jan-Ole Berger](#):
>
> Well but you maybe dont want to have all of them with the same color? And you cant manage it with Javascript/CSS because the IDs are dynamically generated.

Yes but you can at least put it in the PageSource so it become page specific. Not ideal but still works really well unless you want different select colours on different listboxes on the same page, if thats what you want then your stuffed at present but I think this should be possible soon from what Greg has said.

---

<div class="post-metadata">

**Author:** ![Jan-Ole\_Berger](https://forum.xojo.com/letter_avatar_proxy/v4/letter/j/6f9a4e/32.png) [@Jan-Ole\_Berger](https://forum.xojo.com/u/Jan-Ole_Berger)\
**Post date:** [June 20, 2014, 7:53am UTC](https://forum.xojo.com/t/listbox-selected-row-colour/17384/11 "2014-06-20T07:53:28Z")

</div>

> [@102416:@Nathan Wright](#):
>
> Yes but you can at least put it in the PageSource so it become page specific. Not ideal but still works really well unless you want different select colours on different listboxes on the same page, if thats what you want then your stuffed at present but I think this should be possible soon from what Greg has said.

😉  
Well with WCC you can, but i’d like to see it in Xojo w/o any plugins, like they arrow-keys-navigation in the Web-App(!)

---

<div class="post-metadata">

**Author:** ![system](https://forum.xojo.com/uploads/default/original/1X/455b4dcc0e61630e9f81940004ddffa49c432a46.png) [@system](https://forum.xojo.com/u/system)\
**Post date:** [October 29, 2020, 5:16pm UTC](https://forum.xojo.com/t/listbox-selected-row-colour/17384/12 "2020-10-29T17:16:50Z")

</div>


