Page 1 of 1

Setting arbitrary colour?

PostPosted: 07 Jun 2017 09:50
by Soren SDF
Hi.

Is it possible to somehow display a different colour on some each item in the list? Like setting the "brush" property of a windows component.
I have a list of items that have a couple of different states and these states are colour coded in the windows version of our app.
To make matters more complicated the user can assign their own colours to each state. Would it be possible to color code the items in a listview using the same colours? It doesn't have to be the whole background, i could settle for a coloured marker somewhere on the item.

T.I.A.

Sören

Re: Setting arbitrary colour?

PostPosted: 07 Jun 2017 14:15
by Alexander Bulei
Hi Soren,

You can insert the html into the Header property...

E.g:
Code: Select all
<span style="width: 10px;background: red;display:inline-block;height: 10px;border-radius: 50%;"></span> List Item #1


Best Regards.

Re: Setting arbitrary colour?

PostPosted: 08 Jun 2017 15:13
by Soren SDF
Would it be possible to set a hex code instead of "red"?

Re: Setting arbitrary colour?

PostPosted: 08 Jun 2017 16:11
by Jorge Sousa
hi Soren

Yes, you can set an hex value like #abcdef

and also an image url

And perhaps you should use background-color instead of background, depends on the case.

More info

https://www.w3schools.com/cssref/css3_pr_background.asp

https://www.w3schools.com/cssref/pr_background-color.asp