Space equally vertically

Hi

let's suppose I have 3 child bands with a memo in each one. How can I space equally vertically my memos inside the bands?

I've thought to set memo's align = client and to set band height at runtime via script, but I'm wondering if there is an easier way to accomplish this.

Thank you so much!

Comments

  • gordkgordk St.Catherines On. Canada.
    edited 5:28AM
    Hi

    let's suppose I have 3 child bands with a memo in each one. How can I space equally vertically my memos inside the bands?
    Statement is ambiguous you only have 1 memo in each band or do you mean 3 memos in 1 band?
    1 memo in each set the memoviews top to the top of the band "0", set the band height to the height of the memoview.
    white space is created by the offset between top of band and top of memoview and the difference between bottom of memoview and band bottom.
    size bands equally, chain together child1.child property points to child2 etc
    also look at stretch , allowsplit prop of band, stretchmode, shift props of memoview
  • Anu de DeusAnu de Deus Hampshire, UK
    edited 5:28AM
    First, make it a DoublePass report.
    This assumes the following order of printing (debug it to be sure) Memo1, Memo2, and Memo3, and all memos with align = alNone:
    procedure Memo1OnAfterPrint();
    begin
    if Engine.FinalPass = false then 
    begin
    Child2.stretch := true; // or: Child2.height := Memo1.height;
    Memo2.top := Memo1.top;
    Memo2.Height := Memo1.Height;
    Memo2.left := Memo1.left;
    Memo2.width := Memo1.width;
    
    
    
    (repeat for memo3, here should be ok)
    
    end;
    
    end;
    


    I didn't really run the above code, so if this doesn't work, it's because it may be the wrong event, you may need to pick another one (like Child2.OnBeforePrint),
    one where the dimensions of Memo1 have already being set, and you still can change the dimensions of the other ones.

  • gordkgordk St.Catherines On. Canada.
    edited 5:28AM
    be careful when resetting design height and top properties of objects
    effects are cumulative on sucessive iterations of the object, if the props are not reset and you can endup widowing objects to the page.
    When controlling output, you should use the engine object's curx cury props
    to control the position on the output page.
    see the users manual on using the engine object.

Leave a Comment

Rich Text Editor. To edit a paragraph's style, hit tab to get to the paragraph menu. From there you will be able to pick one style. Nothing defaults to paragraph. An inline formatting menu will show up when you select text. Hit tab to get into that menu. Some elements, such as rich link embeds, images, loading indicators, and error messages may get inserted into the editor. You may navigate to these using the arrow keys inside of the editor and delete them with the delete or backspace key.