How to change height of TCustomDiagramBlock

Dear all,

I want to use an visualisation automation of block height,
using one Block as background     and one similar Block as front.

What I've tried was to copy the Left, Top, Width, Height properties from Back to Front, and to
set the desired height.

But it turned out that the position and height changes much.
I've tried the simple rectangular blocks, as well as PolygonLine Blocks, both behave differently.

Why can't I simply use the Back Block properties as default for the Front Block, and then tweaking its height and
Top position ?
Do I have to correct Client and Canvas coords, and if so how should I do that correctly ?

Maybe I've choosen the wrong properties, can anybody help with that ?

Best regards

Rolf


To change block position you just use Left, Top, Width and Height properties.

Setting a block position based on another one should be as simple as copying the properties:
 
Block1.Left := Block2.Left;
Block1.Top := Block2.Top;
Block1.Width := Block2.Width;
Block1.Height := Block2.Height;
 
if you are experiencing issues with it, it might be something specific, can you post some code?

Dear Wagner Landgraf,

yes, thats what I've tried, but it seems to re-position the block somewhere else.
I assume that zoom ratio or the like will be affected differently, could this be the case ?

My Back blocks and Front blocks are grouped together, and I try to reset them in the same way like you did.
But as result the Front block moved and sized different.



Regards

Rolf