|
|
CreateColumns
Method will create a row of FormatBlocks either for direct input or as Templates for multiple rows. The method will determine the position for each column and add the appropriate borders to each cell depending on it's position.
The style properties for each item can be adjusted after the method has been called.
The AutoStyleRowType parameter is used to indicate the type of row being created. There are four styles (none, first, middle and last). The style ensures the correct borders are used and also creates the correct alignment and break parameters for the row.
The InsertRow method can be used to
Insert rows based on Templates created by the method.
Syntax Object.CreateColumns (Columns As Integer, Key As String, CreateTemplates As Boolean, FontName As String, FontSize As Single, Alignment As qePrinterAlign, IndentLeft As Single, IndentRight As Single, AutoStyleRowType As qeCreateColumnRowType, GapBetweenColumns As Single, ParamArray WidthRatios() As Variant)
| Parameters | | Columns | The number of Columns in the Row. | | Key | The Key each DocumentItem or Template Item will be given, this will be appended with the number of the Column. | | CreateTemplates | Determines whether a Template will be created or a row of DocumentItems. Templates can be used to add rows in the same style. | | FontName | The FontName to use for each column (these can be changed after the method has been used) | | FontSize | The FontSize for each column. | | Alignment | The Alignment for the text in each column. | | IndentLeft | The position from the left margin of the document where the row should start. | | IndentRight | The position from the right margin of the document where the row should end. | | AutoStyleRowType | Used to create four types of row; None, First, Middle, Last. The different styles alter how the borders for each row is displayed and the 'Last' style ensures that any DocumentItems after the row are not linked to the row. The 'First Row' style will set the 'FontBold' property for each cell. If the value is ccrNone a border will be created around each column. | | GapBetweenColumns | The gap between each column - this can have an impact on the borders as no horizontal borders will cross the gaps. | | ParamArray WidthRatios() | A ParamArray of numeric values indicating the width ratio of each column. See the Notes below for further details. |
Notes The WidthRatios() parameter is used to determine variations in the width of each column. The method will total all the values in the Array and then use each value to determine the size of the column. For example:
Columns: 3
WidthRatios: 3,5,2
Total Ratio: 3 + 5 + 2 = 10
The first column would be 30% of the width of the row, the second column would be 50% of the width and the last column would be 20%.
Example
See Also: qcDocument.InsertRow,
qcPrinter.Table_BestFit, qcFormatBlock.ShowBorder, qcFormatBlock.KeepWithNext, qcFormatBlock.VAlignNextItem
|