CGridCtrl:SetHorzAlign, CGridView:SetHorzAlign


The SetHorzAlign method sets the horizontal alignment for tha grid column or the entire grid. This method overrides the initial grid properties defined by the values of GridParams.nHorzAlign and GridParams.nSH_HorzAlign.

Syntax

CGridCtrl:SetHorzAlign( nAlign )

CGridCtrl:SetHorzAlign( nCol, nAlign )

bullet.gif    Where nAlign is the alignment value: 1= align left, 2= align right, 3= align center.

bullet.gif    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.

bullet.gif    If nCol is not specified, the entire table is set.

Example

The following script sets the alignment of the right-most column in the left side header (column 0) to "center":

V = attach_gridview()

-- attach a grid from the Mira desktop

G = new_gridctrl(V)

-- create a CGridCtrl for the window

G:SetHorzAlign( 2, 3 )

-- set the alignment of column 2 to "center"

Related Topics

CGridCtrl class

SetCellHorzAlign

SetVertAlign

SetCellVertAlign


Mira Pro x64 Script User's Guide, v.8.77 Copyright Ⓒ 2024 Mirametrics, Inc. All Rights Reserved.