TLabelFrame is a specialised frame for generating labels by row and column (or by column and row) on multiple pages. It generates simple before/after page events for each page used, but the main "code loop" cycles through individual labels.
Execute the label report by calling TLabelFrame.Execute(ReportWriter).
Control Flow for a TLabelFrame
When executed, a TLabelFrame cycles through a label output event, OnLabel, for each label to be generated. You can specify a default FontIndex and TabIndex in the label output band, BandLabel. The repeated frame loop continues to cycle until invalidated in code by setting event parameter Valid := False within the loop.
The position of each label can be referenced by numeric properties LabelColumn and LabelRow, or by the sequence number LabelIndex (1..LabelCount across all labels) or LabelPageIndex (1..LabelsPerPage across the labels on one page).
Label Layout
By setting just a few properties, you can describe the size and layout of labels on the page, as illustrated here:
Set the LabelColumns and LabelRows properties to define how many columns and rows of labels appear on each page. To accommodate already-used labels on the first page, you can skip initial label positions by specifying a LabelSkipCount or by setting the LabelStartColumn and LabelStartRow properties.
Label Borders
The printed label has an optional printed border (outer label extent) and an optional inner printed text border. These borders may be defined as a rectangle (with rounded corners if desired) or as an ellipse. Margins within the text border define a target text output area.