Rich Text 101 - Tables, Part 1
Tue 15 Jul 2003, 11:24 PMTweet
by Ben Langhinrichs
Tables have been a part of Lotus Notes/Domino since the earliest versions, but that doesn't mean they have stayed the same. There have been many additions and modifications to the way tables are handled, and new features to make fairly complicated tables fairly easy to create. Some of these features are wonderful, such as the tabbed table, while some are much less well thought out, such as animated tables. The purpose of this article is to explain some of the basic limits of tables, and start covering a few of the features that make them powerful, along with a few tips to help you use them effectively. Part 2 will cover more tips, tricks and workarounds, especially with tabbed tables and animated tables. If that takes long enough, Part 3 will cover hide-when formulas, how to use them effectively and (relatively) safely, as well as some ideas about how to make tables look good on the web without making the whole table out of pass through HTML. If I think of more, there might even be a Part 5.
Basic table limits
It is very important to understand some of the basic limitations on tables, since these effect decisions on where and how to use them. Here are some numerical limits to keep in mind, along with my view on the likelihood they will continue to be limits in future versions:
- Each table may have no more than 255 rows (not likely to change, since the Row value in the table cell CD record structure is a single byte). I am surprised this wasn't changed earlier, but it seems less and less likely it will change). Unlike HTML, every row is actually numbered.
- Each row may have no more than 64 columns. This could change fairly easily from a data storage perspective, but since table rendering is pretty bad already, I doubt it will.
- Each column must be at least 0.125 inches wide. This is a UI constraint, not an internal constraint, as with Midas it is easy to create tables with more narrow columns, and the UI renders them just fine. It may change, but I think it unlikely.
- Each column width cannot be greater than 22.75 inches. This is enforced, and won't change as widths in rich text are measured in TWIPS, which are 1440 per inch, so 1440*22.75=32760, which uses up a WORD. Since there are lots of widths that are stored as WORD size, this isn't going to change.
- The total table width cannot be greater than 22.75 inches. Actually, this is documented some places, but is not true. You simply can't see more than 22.75 inches on a Notes client, as that is the limit of paragraphs and such (see point above for reason). Try it with a table and use the horizontal scroll bar and it will stop at 22.75 inches. You also can't tab to the other columns. So, this is an unenforced limit, but a sensible one, and it isn't going to changed.
- Nested tables can only nest to 10 levels. While this is a UI constraint, it does make the client unstable to go beyond 10 levels with Midas, so Midas is also limited to 10 levels. Besides, if you feel the need to nest beyond 10 levels, you need to get a strong cup of coffee and go somewhere quiet to think things over.
New table features in R5 and ND6
I could list new features in R4, but it seems a bit silly now. I plan to cover each of the major table enhancements in R5 and Notes 6 (not necessarily in order of importance), along with ways to use these features more effectively.
Very important addition to R5, but with some very important compatibility issues between the Notes client and web browsers. On the web, nested tables are used extensively, so they need to be in the Notes client. The only trouble is, they are harder to use in the Notes client because of latent spacing. Below I show how these differ from web nested tables and one way to make them work in roughly the same way.
See below for an image of a simple 2x2 table nested inside another simple 2x2 table created in the Notes client:
Note that there is space before the table and after it, even though there is nothing in the cell except the table. Now, after turning off the borders, we get:
but you can still see that there is space before the nested table. If we show this same table on the web, we get:
which makes more sense, since the nested table completely fills the cell. We can do almost the same in the Notes client by putting the cursor in the space before the nested table and setting it to be hidden when read, then doing the same in the space after the nested table. The result looks like the web result:
Now, using this technique, we get a properly nested table. Be forewarned though, I hid a different problem by turning the borders off. If you look very carefully at the image above, you will see that the very left hand side still shows a bit of the cell. If you have the borders turned on, this is even worse:
For this reason, I advocate turning the borders off when possible and using cell color to differentiate rows. Very mild colors are possible (these odd colors are actually an artifact of using 256 colors to save the images).
To be continued in Rich Text 101 - Tables, Part 2 (whenever it is ready)
Copyright © 2003 Genii Software Ltd.
What has been said:
22.1. Tom Duff (07/16/2003 03:40 PM)
Great stuff, Ben... Thanks for sharing with us!
22.2. Ben Langhinrichs (07/16/2003 09:09 PM)
Glad you enjoy it. Let me know what kinds of content, tips, technical details, or whatever, you would like to see more or less of.
22.3. Alain H Romedenne (07/23/2003 08:08 AM)
Although your tutorial is about Rich Text Tables, I feel your introduction could mention UI or design alternatives to RT Tables.
IMHO, For simple tables embedding views can be an option. Presenting Views XML streams using IE XML islands is another one.
22.4. Paul Davies (08/19/2003 01:16 AM)
Excellent source of information Ben. I do though think the data about tables could benefit from metric conversion. I believe it's pretty much just the US that uses inches - even most of the UK uses metric measurements for UI design.
22.5. Peter (11/25/2003 08:38 AM)
I'm trying to figure out why i get broken tables and extra white space in Lotus (v5- 6.2). Tables are stretched and reformatted. Are there things to avoid here, spacer.gifs, borders etc?
I basically have been trying to design my html code for all other clients and browsers/email clients, it looks good in all except Lotus Notes. This is pretty basic design hand coded with a couple of nested tables and a few graphics. Any help would be appreciated. Thank you
22.6. Ben Langhinrichs (11/25/2003 09:10 AM)
Peter - Do you get this when the MIME gets converted to rich text (e.g., when e-mail is received by a Notes client) or when importing HTML or when generating HTML using Domino. Send me an e-mail with an example and some details and I'd be happy to show you ways to help or make suggestions.
In general, Notes does a lousy job of rendering HTML into rich text. Our Midas Rich Text LSX product does somewhat better, although some of the problem is just differences between the browser capabilities/limitations and Notes rich text capabilities/limitations.
22.7. Regina Bautista (11/25/2004 12:40 AM)
Im using a Domino application from a Web browser and I move to the second or third tab of a tabbed table. If a document refresh occurs (e.g., change a value in a keyword field where Iv enabled the "Refresh Fields on Change" option), the first tab of the table will display, not the tab you selected earlier. Pls help me resolve this. Thanks