pbMultiLine - cCJGridColumn
Indicates whether the column supports multi-line rows
Type: Property
Access: Read/Write
Data Type: Boolean
Parameters: None
Syntax
Property Boolean pbMultiLine
| Access Type | Syntax |
|---|---|
| Read Access: | Get pbMultiLine to BooleanVariable |
| Write Access: | Set pbMultiLine to BooleanVariable/Value |
Description
Setting pbMultiLine to True allows the text to "wrap" in a column if the width of the column is not wide enough to display the contents of the item. In this case, the height of each row is determined by the height of the multi-line cell in that row containing the most wrapped lines of text.
If you are displaying images in a column that exceed the grid's row height, then you must also set pbMultiLine to True, otherwise the images will be clipped or may not appear at all. Images can be displayed in individual cells via the column's OnSetDisplayMetrics event.
Setting pbMultiLine to True will, by necessity, also change the Grid Paint Manager's ComFixedRowHeight property to False. The CodeJock grid control is optimized to paint most efficiently when the row height is fixed. This means that setting pbMultiLine to True will cause grid painting to slow down. You will especially notice this when the grid has many columns that are horizontally scrolled.
Setting pbMultiLine to True and peHeaderAlignment to xtpAlignmentWordBreak can also provide multi-line word wrapping in the grid header. Since setting pbMultiLine to True negatively impacts the painting performance of your grid, this is not the recommended technique for supporting multi-line text in the header. You should only use this approach if you are already displaying multi-line text in the report body.
The preferred technique for supporting multi-line text (or large icons) in the grid header is to set the grid's piHeaderHeightMultiplier property. This allows you to enlarge the header without impacting the grid's painting performance. Do not use piHeaderHeightMultiplier in combination with pbMultiLine set to True, otherwise the header height cannot be calculated correctly.