VSView Reporting Edition Reference > Field Object > Field Properties > Anchor Property |
Gets or sets how the field position and dimensions should be affected when the containing section changes size as a result of CanGrow or CanShrink.
AnchorSettings Field.Anchor
When a section grows or shrinks as a result of processing the CanGrow and CanShrink properties, fields usually retain their original position and size (Top and Height properties).
In some cases, you may want to force fields to grow with the section, regardless of their content. For example, you may have vertical lines that should span the height of the section, or horizontal borders that should be positioned with respect to the bottom of the section. You can achieve this with the Anchor property.
Valid AnchorSettings
vsrATop
Default. When the section grows, the distance between the top of the field and the top of the section remains the same.
vsrABottom
When the section grows, the field is pushed down. The distance between the bottom of the field and the bottom of the section remains the same.
vsrATopAndBottom
When the section grows, the field is stretched vertically. The distance between the top of the field and the top of the section remain the same, and so does the distance between the bottom of the field and the bottom of the section.
The diagram below shows the effect of the Anchor property on a field.
BEFORE
========================================================= section top
+----------------+ +----------------+ +----------------+
| vsrATop | | vsrABottom | |vsrATopAndBottom|
+----------------+ +----------------+ +----------------+
========================================================= section bottom
If this section grew as a result of processing the CanGrow property, it would be rendered like this:
AFTER
========================================================= section top
+----------------+ +----------------+
| vsrATop | | |
+----------------+ | |
| |
|vsrATopAndBottom|
| |
+----------------+ | |
| vsrABottom | | |
+----------------+ +----------------+
========================================================== section bottom