How to dock / anchor component to underlying band?

Stimulsoft Ultimate discussion
Post Reply
User avatar
tpontow
Posts: 206
Joined: Thu Sep 06, 2012 8:46 am
Location: Bonn, Germany

How to dock / anchor component to underlying band?

Post by tpontow »

Hello Stimulsoft support,

how can i fix text components in a data / header / footer band so that all components are placed the same location relative to parent band even if page margins change at run time?

For example i increase left and right page margin of my report at runtime. So the bands are getting smaller but the text components are still at the same location and now in part outside the band.

I tried combinations of property values of

Code: Select all

DockStyle, ShiftMode, Locked, Linked
properties. But nothing worked. Can you explain the effect of these four properties? Class reference documentation for that is very poor ( http://admin.stimulsoft.com/documentati ... index.html ) by the way! (For example: ShiftMode is explained with "Gets or sets a value which indicates the shift mode of the component.") But nothing is said about the meaning of that and there is no description of the StiShiftMode enum values in documentation.

Hope you can clear it up a bit!

Thanks and regards
Thorsten Pontow
Thorsten Pontow

It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to dock / anchor component to underlying band?

Post by HighAley »

Hello, Thorsten.

You could read about the Shift Mode in the User Manual.
The DockStyle property Dock components to the specified side of the components or fill it. This property is usual used when you disable a text component by condition and need to avoid blank space between columns.
The Lock and Linked property is for design time only. The Lock property don't allow to change component's size and position at design time. The Linked property link the component to it's container even if you move it to the other band.

Thank you.
User avatar
tpontow
Posts: 206
Joined: Thu Sep 06, 2012 8:46 am
Location: Bonn, Germany

Re: How to dock / anchor component to underlying band?

Post by tpontow »

Hello Aleksey,

thank you for your quick reply and for explaining the properties to me. I read the documentation you linked for me about ShiftMode.

But i still haven't solved my problem. I attach a picture which i hope will demonstrate my problem.

Maybe you can give me some help and advice for that?

Thank you
Attachments
Dock / Anchor of right text component problem
Dock / Anchor of right text component problem
DockAnchorProblem.png (40.19 KiB) Viewed 4155 times
Thorsten Pontow

It is easier to write an incorrect program than to understand a correct one. (Alan J. Perlis, Epigrams in programming No. 7)
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: How to dock / anchor component to underlying band?

Post by HighAley »

Hello.

The coordinates of the text components are set for the container. The top left corner of the container has (0,0) coordinates.
If you change the Page Margin, the coordinates of text components on the Footer Band are not changed relatively to the top left corner of the band.

We have played with Panels and Dock Style properties. Here is a solution.
TextBoxAlign.mrt
(7.09 KiB) Downloaded 558 times
Thank you.
Post Reply