Anchor property

Top  Previous  Next

Every report object has this property. It determines how the object will be changing its position and/or its size when the container on which it is laying will be changing its size. By using Anchor, it can be done in such a way that, the object expands or moves synchronously with its container.

 

The container, being referred to, in many cases will be the band. But this is not a must - this can also be the "Table" or "Matrix" objects.

 

The "Anchor" property can have one of the following values, and also any combination of them:

 

Value

Description

Left

Anchors the left edge of the object. When the container's size will be changing, the object will not be moving left/right.

Top

Anchors the top edge of the object .When the container's height will be changing, the object will not be moving up/down.

Right

Anchors the right edge of the object .When the container's width will be changing , the distance between the right edge of the object and the container will be constant. If the left edge of the container is anchored as well, then the object will be growing and shrinking synchronously with container.

Bottom

Anchors the bottom edge of the object. When the container's height will be changing, the distance between the bottom edge of the object and the container will be constant. If the top edge of the object is anchored as well, the object will be growing and shrinking synchronously with container.

 

By default, the value of this property is Left, Top. This means that, when the container's size will be changing, the object will not be changing. In the table below, combinations of some frequent used values are given:

 

Value

Description

Left, Top

Value by default. The object does not change when the size of the container changes.

Left, Bottom

The object moves up/down when the height of the container changes. The position of the object in relation to the bottom edge of the container does not change.

Left, Top, Bottom

When the height of the container is changing, the height of the object synchronously changes with it.

Left, Top, Right, Bottom

When the width and the height of the container are changing, the object grows or shrinks synchronously with it.