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
Lotus Notes and Domino 6 Programming Bible by Brian Benz, Rocky Oliver
Covers all the programming techniques, concepts, and languages used with Notes and Domino, as well as the many new features of Domino 6 Thoroughly examines the Notes and Domino role with Java, XML, Web services, and other IBM products and technologies Provides extensive code and examples, many geared to the needs of administrators High-profile authors, known to their audience through conferences and articles Companion Web site shows example applications from the book running on a live Domino server and provides code download.
See at: Amazon.co.uk | Amazon.com |