CGridView:SetHorzAlign
The SetHorzAlign method sets the horizontal alignment for specific cells or an entire column of the grid. This method overrides the initial grid properties defined by the values of GridParams.nHorzAlign and GridParams.nSH_HorzAlign.
CGridView:SetHorzAlign( nAlign )
CGridView:SetHorzAlign( nCol, nAlign )
CGridView:SetHorzAlign( nCol, nRow, nAlign )
Where nAlign is the alignment value: 1: align left, 2: align right, 3: align center.
nCol is the index of the column to set. Columns in the table body begin at index 1. A value of 0 or less indicates a column in the left side heading.
nRow is the index of the row to set. Rows in the table body begin at index 1. A value of 0 or less indicates a row in the top heading.
If neither nCol nor nRow is specified, the entire table is set.
The following script sets the alignment of the right-most column in the left side header (column 0) to "center":
|
-- attach a grid from the Mira desktop |
|
-- set the alignment of column 0 to "center" |
Mira Pro x64 Script User's Guide, Copyright Ⓒ 2023 Mirametrics,
Inc. All Rights Reserved.