Using Layers in the Notes Client - Part I
In my first posting on layers I talked about the reasons you wouldn't want
to use layers when creating a dialog box to be displayed in the Notes Client.
Today I am going to talk about using layers to place text where you previously
couldn't and to display text dynamically.
Putting Things Exactly Where You Want Them
There have been many occasions when I have wanted to place text or an image
on the same horizontal place as a table only to be frustrated that I couldn't,
or forced to add a column and merge the rows and then only getting something
that approximated what I really wanted. In layers I now have a design element
that can be placed anywhere in a form, and can be used to place other design
elements like fields, any place on the form. When created, a layer has
two parts: an anchor, the display pane. As with other design elements,
the anchor must be positioned either above or below a table. However the
display pane can be positioned any place on a form. You position the display
pane by dragging it to the desired postion or by filling in the coordinates
in the layer's properties box. Once you place the display pane on the same
horizontal plane as a table, you can fill it with text, images or other
design elements.
Displaying Layers Dynamically
When creating multiple layers you can place the anchors one next to the
other, or on multiple lines. If you want to display the layers dynamically
then you should place them on separate lines. To display a layer dynamically
you set the hide-when formula of the text paragraph that contains the layer's
anchor. Here's an example of a form containing a table and 4 layers.
In this example the layers will be used to create context sensitive help
for the fields in the table. Each Action Hotspot contains this code with
the appropriate setting for the field WhichHelp.:
Sub Click(Source As Button)
Dim workspace As New NotesUIWorkspace
Dim thisDoc As NotesUIDocument
Set thisDoc=workspace.CurrentDocument
thisDoc.FieldSetText "WhichHelp","1"
thisDoc.Refresh
End Sub
The hide-when formula for each anchor is a version of this:
WhichHelp!="1"
Each time the Action Hotspot to the right of a field is clicked, the appropriate
help is displayed to the right of the table.





-