CGDevTools Forum

Welcome to the Official CGDevTools Support Community Forums.

Setting arbitrary colour?

by Soren SDF » 07 Jun 2017 09:50

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
Soren SDF
 
Posts: 87
Joined: 19 Apr 2013 15:56

by Alexander Bulei » 07 Jun 2017 14:15

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.
Group: Developers | Support Team

  • info [at] cgdevtools.com - General information
  • sales [at] cgdevtools.com - Sales department
  • support [at] cgdevtools.com - Product and Technical Support
User avatar
Alexander Bulei
Site Admin
 
Posts: 3635
Joined: 15 May 2012 08:52
Location: Mealhada, Portugal

by Soren SDF » 08 Jun 2017 15:13

Would it be possible to set a hex code instead of "red"?
Soren SDF
 
Posts: 87
Joined: 19 Apr 2013 15:56

by Jorge Sousa » 08 Jun 2017 16:11

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
Best Regards
CGDevTools Develop / Support Team
Home Page: http://www.cgdevtools.com
Jorge Sousa
 
Posts: 4261
Joined: 17 May 2012 09:58


Return to JQMListView

Who is online

Users browsing this forum: No registered users and 1 guest

Contact Us.