BackgroundColor (NotesView - JavaScript)

Read-write. The background color of a view.

Defined in

NotesView

Syntax

getBackgroundColor() : int

setBackgroundColor(color:int) : void

Legal value

A Domino® color index in the range 0-240; see NotesColorObject. The first 16 colors are:
  • 0 COLOR_BLACK
  • 1 COLOR_WHITE
  • 2 COLOR_RED
  • 3 COLOR_GREEN
  • 4 COLOR_BLUE
  • 5 COLOR_MAGENTA
  • 6 COLOR_YELLOW
  • 7 COLOR_CYAN
  • 8 COLOR_DARK_RED
  • 9 COLOR_DARK_GREEN
  • 10 COLOR_DARK_BLUE
  • 11 COLOR_DARK_MAGENTA
  • 12 COLOR_DARK_YELLOW
  • 13 COLOR_DARK_CYAN
  • 14 COLOR_GRAY
  • 15 COLOR_LIGHT_GRAY

Examples

This button toggles the background color of a view.
var v:NotesView = database.getView("main");
if (v.getBackgroundColor() == NotesRichTextStyle.COLOR_LIGHT_GRAY) {
	v.setBackgroundColor(NotesRichTextStyle.COLOR_YELLOW);
	requestScope.status = "New color is yellow";
 } else if (v.getBackgroundColor() == NotesRichTextStyle.COLOR_YELLOW) {
	v.setBackgroundColor(NotesRichTextStyle.COLOR_WHITE);
	requestScope.status = "New color is white"; 
} else {
	v.setBackgroundColor(NotesRichTextStyle.COLOR_LIGHT_GRAY);
	requestScope.status = "New color is light gray"; 
}