Notes Ninjas Notes Ninjas
Lotus Notes hints, tips, error messages
Change Row colour in a view

Hint Short Cut: Add this to your code & documentation to help you find this page.
http://www.notesninjas.com/#ViewColumnRowBackgroundColours or http://www.notesninjas.com/A555F9/nn.nsf/ByAlias/ViewColumnRowBackgroundColours


Coloured view rows and columns, or colored view rows and columns





To do this first add a new column at the beginning of the row:

Set the flag: "use value as color" and make it hidden.

 

@If(Status="Rejected";

255:0:0:  255:255:255;

Form="";

241:241:128: 1:1:1;
1:1:1)

 

The code above puts rejected lines in white text on red background,

categories in black text on yellowy brown background,

and the rest in black on default background.

 

Colours are put in as background 3 rgb numbers then foreground text colour in 3 rgb numbers.

Some colours:

FIELD Apricot:= 255:155:133;

FIELD Black:= 1:1:1;

FIELD Blue:= 0:0:255;

FIELD Green:= 0:255:0;

FIELD OrangeBurnt:= 255:129:65;

FIELD pink:= 255:193:253;

FIELD Red:= 255:0:0;

FIELD White:= 255:255:255;

FIELD Yellow:= 255:255:0;

FIELD YellowyBrown:= 241:241:128;

 

FIELD RejectBgrd:=red;

 

If you only put one colour in ie 1:1:1, then the background stays the same as the normal row colour, and the number refers to the text colour.

Handy if you are using alternate row colours.

Remember that the help spells colour as color. : )

 

Top Tip:

if you set the colours and colour vars in an early column using FIELD RejectBgrd:=red; then later columns can refer to that value.

eg

@If(Status="Rejected"

RejectBgrd:  white;

Form=""

YellowyBrown: black;
black)

 

Very handy if you are using lots of columns and you want to try different colour schemes, and you don't want to have to change the colours in every column.

 

 

 

 Jump to:     Notes Tips
    Lotus Notes Index 
  Register for Tips
Previous Lotus Notes Tip 
    Next Lotus Notes Tip
Your company logo here?
Adam Foster
Free Cash Making Web Site
Free Revenue Earning Blog Site
 Free Revenue Earning Newsletter Site   
Free Search Pages Free Web stats
Free Contact Us page
Cheap .com domain names
 Need a website or 
   Lotus Notes
  problem solved?
Adam Foster
Web Services Platform Architecture: Soap, WSDL, WS-Policy, WS-Addressing, WS-Bpel, WS-Reliable Messaging and More by Francisco Curbera, Frank Leymann, Tony Storey, Donald Ferguson, Sanjiva Weerawarana
Other books claim to present the complete Web services platform architecture, but this is the first one I've seen that really does. The authors have been intimately involved in the creation of the architecture. Who better to write this book?
See at: Amazon.co.uk | Amazon.com |