Subscribe for automatic updates: RSS icon RSS

Login icon Sign in for full access | Help icon Help
Advanced search

Pages: [1]
  Reply  |  Print  
Author Topic: Ask Reuben 4 - Change Background Color Of Alternate Rows  (Read 6023 times)
Reuben B.
Four Js
Posts: 1116


« on: April 15, 2020, 03:50:47 am »

How do you make the background color of rows in a DISPLAY ARRAY + TABLE different colors so that it is easier to read across rows of data?

When viewing data in a DISPLAY ARRAY + TABLE it can be difficult to read across rows and errors may occur if you accidentally skip up or down a row whilst reading from left to right.

Some of you maybe old enough to remember green bar paper (alternatively known as gold bar or zebra paper).  That made it easy to read reports (and code printouts!) as you read across either a white row or a different coloured alternate row, typically green or gold, hence the name green or gold bar.  The alternating bands of color kept your eyes in the same row.

Using Presentation Styles it is possible to do a similar thing in Genero screens.  It makes use of what is called a pseudo-selector, that is a selector that is neither a widget or a style, but is a style selector that can be used to apply a presentation style if a certain condition is fulfilled.  In this case we can use the “odd” and/or “even” pseudo-selector to apply a presentation style, in this case the background colour, to odd and/or even rows.

Read more at https://4js.com/ask-reuben/ig-4/

Product Consultant (Asia Pacific)
Developer Relations Manager (Worldwide)
Author of https://4js.com/ask-reuben
Contributor to https://github.com/FourjsGenero
Pages: [1]
  Reply  |  Print  
 
Jump to:  

Powered by SMF 1.1.21 | SMF © 2015, Simple Machines