How To…Align Memo Bottoms

Question

“How can I align the bottoms of two stretching memos?”

Solution

This example contains a report with two stretching Memos inside a Region. Region.KeepTogether is set to True.

The Memo OnDrawCommandCreate event is used to obtain a reference to the DrawCommand object that is created each time the object generates on the page. The Detail AfterPrint event is used to compare and adjust the positions of the Memo DrawCommands.

Download: AlignMemoBottoms.zip

Sample Delphi code: