Layers - What can you do with them besides make a cake? Part I
A few days ago some of us were having
a conversation that started out as a discussion of layout regions and ended
with layers. One person offered that Layout regions predated tables. I
questioned that and went to my bookshelf to check older copies of the Lotus
Notes Applications Developer Guide. The first references I found for either
design element were in the R4 Developer Guide. While I was right that layout
regions did not predate tables, I was wrong in thinking they were introduced
in R4.
Ben Langinrichs of Genii
Software pointed me to The
History of Notes and Domino
which clearly states that tables were introduced in R2. As we were having
this conversation in the Lotus Business Partner Forum, several other members
chimed in with their guesses on which design element came when. Howard
Greenberg of TLCC
added that he remembered teaching layout regions in the R3 to R4 update
classes, and that tables had been around for as long as he could remember.
He also added this line "Then in ND6 they were obsoleted with the
layers..." This is what really caught my eye . Tables, obsolete???
I couldn't imagine building a Notes or Domino application without using
tables. Actually what Howard had meant was that layers had obsoleted layout
regions, but I wasn't sure even that was correct.
Because of some of the limitations of
layout regions, I almost never used them for anything. The exception was
when I was designing dialog boxes. Their usefulness declined even more
when they weren't supported in web applications. When nested tables came
to R5 and could be used to simulate dialog boxes, the layout region's fate
was sealed as a deprecated design element. But back to Howard's comment
about layers obsoleting layout regions - could it be that layers can be
used to create dialog boxes?
My frame of reference for layers
comes from two arenas. The first is in creating images. You create and
stack layers that can be combined in various ways to create one or more
images - object oriented image development if you will. The second is from
web development where layers are used to make things visible or invisible
on a page as the result of a mouse-over or mouse-click. So It had never
occurred to me to try using them in a Notes client dialog box or form.
I decided it was time to give it a try, and see what happened.
Can you use layers in a Notes dialog
box? Yes and No. You can use a layer that's placed in a table cell,
you can use a layer that contains fields, but you can't use a layer that
contains a table that contains fields. When you try the latter you will
get an error when you try to raise the dialog box. Okay so you can use
layers in dialog boxes, but how do they look? Well unfortunately the [AutoVertFit],
[AutoHorzFit] and [SizeToTable] parameters of the @DialogBox function have
no effect. Therefore using layers to simulate traditional Windows-like
dialog boxes doesn't work. Best to stick with tables when creating dialog
boxes.





-