Programming Reference

Cell JUSTIFY Attribute

Cell JUSTIFY Attribute

Every ZeeGrid cell has a justify attribute. It is this attribute that defines the positioning of text and numberic data when it is displayed in the cell. Refer to the diagram of a cell below for justification values and their positioning.

             |0                         3                           6|       
             |                                                       |       
             |1                         4                           7|       
             |                                                       |       
             |2 & 9                   5 & 10                   8 & 11|       
Justification values 0..8 are for single line data. These would be used in the data rows 1 and higher in the ZeeGrid. Values 9..11 are for multiple line data. Only the ZeeGrid title (cell index 0) and column header cells can use multiline text. (JUSTIFY values 9..11)

Justification values 0, 3, 6, 2, 5, and 8 can be used, but are not considered the norm. The ZeeGrid header file defines the most common justifications as follows:

          #define LEFT_SINGLE   1     
          #define CENTER_SINGLE 4     
          #define RIGHT_SINGLE  7     
          #define LEFT_MULTI    9     
          #define CENTER_MULTI  10    
          #define RIGHT_MULTI   11    
Unless you specify otherwise, text data will use the LEFT_SINGLE justification; numeric data will use the RIGHT_SINGLE justification; BOOLEAN data will use the CENTER_SINGLE justificiation. The ZeeGrid title uses LEFT_MULTI by default, and the column headers use CENTER_MULTI by default.

ZeeGrid messages related to the JUSTIFY attribute:

ZeeGridTMCopyright © 2002-2016 by David Hillard