Who is this guy?

PlanetLotus.org

Idea Jam

Flickr Photos

www.flickr.com
This is a Flickr badge showing photos in a set called BlogPics. Make your own badge here.

Blogroll

The Badges

October 14th, 2009

Idea: Set table cell background color via LotusScript

So, I was tasked with creating a table in a notification email approximating a dashboard view in an application I've been working on.

I'd not done much heavy manipulation of tables via LotusScript before, but after looking around the 'net for a bit, some things I found took me down the right road.

I was able to get the table built to the right size and dimensions.  I could do the alternating row color thing.  I could even get the text I'd be appending to the table to be color-coded programatically based on my field values.   What I could NOT do for the life of me, was to set the background color of an individual table cell to a certain color programatically like I'd been able to do with the foreground text. 

Unfortunately that was what I was trying to do, as the view I was trying to approximate was doing column background coloring to show the dashboard info.

The closest thing I could come up with was to use the following construct at each cell that I wanted to set as a certain color.  Basically a bunch of "|" characters all smashed together for the entire length of the table cell.

Call rtitem.BeginInsert(rtnav)'
If C2=0 Then
 richStyle.NotesColor = COLOR_RED
Elseif C2=1 Then
 richStyle.NotesColor = COLOR_YELLOW
Elseif C2=2 Then
 richStyle.NotesColor = COLOR_DARK_GREEN
End If
Call rtitem.AppendStyle(richStyle)
Call rtItem.AppendText("||||||||||||||||||||||||||||")  '28 |s
Call rtitem.EndInsert

Resulting in something like this:
colored_table_cells by you. 

What I'd like to propose then, is an idea to incorporate setting an individual table cell's background color into LotusScript, similar to how the text color is set.

IdeaJam item - Set table cell background color via LotusScript

December 2014
Su
Mo
Tu
We
Th
Fr
Sa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31

OpenNTF.org

Latest Googles

Latest Referrers

Credit where it's due

Special thanks to Chris Miller at Connectria for providing hosting services for this site.

How many did you say?

brave souls have visited this strange place

Super Secret Web Admin Thingie ;-)