XTPColumnAlignment Enumeration
Description
Specifies the alignment of the text/icons in a GridColumn.
Members
| Member | Description |
|---|---|
| xtpAlignmentLeft | Left aligns the contents of the GridColumn. |
| xtpAlignmentCenter | Centers the contents of the GridColumn. |
| xtpAlignmentRight | Right aligns the contents of the GridColumn. |
| xtpAlignmentVCenter | Vertically centers the content of cells within the GridColumn. |
| xtpAlignmentWordBreak | This 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. This specifies that line breaks are allowed. |
| xtpAlignmentTextMask | Combination of xtpAlignmentLeft, xtpAlignmentCenter, xtpAlignmentRight, xtpAlignmentVCenter, and xtpAlignmentWordBreak. This is used primarily for BitWise math (AND and OR operators) to remove all Text alignment styles when Text alignment is not needed. For example, Column.Alignment And xtpAlignmentTextMask would result in all Text alignment flags being removed from the column. |
| xtpAlignmentIconLeft | Left aligns the icon of items in the GridColumn. |
| xtpAlignmentIconCenter | Centers the icon of items in the GridColumn. |
| xtpAlignmentIconRight | Right aligns the icon of items in the GridColumn. |
| xtpAlignmentIconTop | Aligns icons on the top of items in the Grid Column. |
| xtpAlignmentIconVCenter | Vertically centers the icon of items in the GridColumn. |
| xtpAlignmentIconBottom | Aligns icons on the bottom of items in the Grid Column. |
| xtpAlignmentIconMask | Combination of xtpAlignmentIconLeft, xtpAlignmentIconCenter, and xtpAlignmentIconRight. This is used primarily for BitWise math (AND and OR operators) to remove all Icon alignment styles when icon alignment is not needed. For example, Column.Alignment And xtpAlignmentIconMask would result in all icon alignment flags being removed from the column. |
Note:
FixedRowHeightmust also be False to allow multi-line rows.
Remarks
This will align the contents of the GridRecordItem within the GridColumn. Both the text and icon can be assigned a different alignment within the same item by combining the text and icon flags.
XTPColumnAlignment can be used for column Footer Alignment, column HeaderAlignment, and Column Alignment.
Example
Column Alignment (Visual Basic)
This sample code illustrates how to specify the alignment of the contents of a GridColumn.
Dim Column As GridColumn
Set Column = wndGridControl.Columns.Add(COLUMN_NAME, "Name", 300, True)
Set Column = wndGridControl.Columns.Add(COLUMN_TYPE, "Type", 184, True)
Set Column = wndGridControl.Columns.Add(COLUMN_MODIFIED, "Modified", 104, True)
Column.Alignment = xtpAlignmentCenter
Set Column = wndGridControl.Columns.Add(COLUMN_SIZE, "Size", 80, True)
Column.Alignment = xtpAlignmentRight
See Also
- GridColumn Object
- GridRecordItem Object
- FooterAlignment Property
- HeaderAlignment Property
- Columns Alignment Property
Copyright (c) 1998-2024 Codejock Technologies. All rights reserved.