Home Server
New Blog Posts: Merging Reports - Part 1 and Part 2

Change region height in code

edited April 2011 in Server
Hi,

I have two regions side by side. The left hand region contains only static
text and a coloured background. The right hand region contains stretching
components. The tops of both regions must be aligned and their height must
be the same. Is there a way to make the height of the left hand region
(static components only) grow to match the height of the stretched right
hand region?

It's not just a matter of setting the left hand region to StretchWithParent
because stretching regions seem to stop printing when they run out of
printable components no matter what their height is set to.

I have tried using one wider region and simulating the left hand region with
a coloured shape set to StretchWithParent. But it seems to be impossible to
perfectly align the borders of shapes with the borders of regions and so a
region containing a shape aligned to its region's border will not align
adequately with a region without such a shape. That is the border of the
shape cannot be made to align perfectly with the border of the region
(applies to both horizontal and vertical borders).

Thanks,
Tony.

Comments

  • edited April 2011
    Sorry, just realised I posted to the wrong group.
  • edited April 2011

    Please configure your news reader to post using your full name.

    One solution would be to configure the z-order such that the stretching
    region generates before the static region. Then implement the
    OnDrawCommandCreate event of each region. For the stretching region get the
    drawcommand.height and store it in a variable and then for the static
    region, set the drawcommand.Height to the variable.



    -
    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com

    Best regards,

    Nard Moseley
    Digital Metaphors
    www.digital-metaphors.com
  • edited April 2011
    Thanks..

    Tony
This discussion has been closed.