MSHFlexGrid Control Constants

This section contains information on the control constants of the MSHFlexGrid. Note that these constants also apply to the MSFlexGrid unless otherwise noted.

AddModeSettings Property (MSHFlexGrid)

Constant Value Description
flexNoAddNew 0 The current cell is not in the last row, and no AddNew operation is pending.
flexAddNewCurrent 1 The current cell is in the last row, but no AddNew operation is pending.
flexAddNewPending 2 The current cell is in the next to last row. This is a result of either a pending AddNew operation initiated by the user through the user interface of the MSHFlexGrid, or setting a column’s Value or Text property programmatically.

AllowUserResizing Property

Constant Value Description
flexResizeNone 0 The user cannot resize with the mouse. This is the default.
flexResizeColumns 1 The user can resize columns using the mouse.
flexResizeRows 2 The user can resize rows using the mouse.
flexResizeBoth 3 The user can resize columns and rows using the mouse.

Appearance Property

Constant Value Description
flexFlat 0 The overall look of MSHFlexGrid is flat, or normal.
flex3D 1 The overall look of MSHFlexGrid is three-dimensional.

BorderStyle Property

Constant Value Description
flexBorderNone 0 There is no border.
flexBorderSingle 1 There is a single border.

CellAlignment Property

Constant Value Description
flexAlignLeftTop 0 The cell content is aligned left, top.
flexAlignLeftCenter 1 The cell content is aligned left, center. This is the default for strings.
flexAlignLeftBottom 2 The cell content is aligned left, bottom.
flexAlignCenterTop 3 The cell content is aligned center, top.
flexAlignCenterCenter 4 The cell content is aligned center, center.
flexAlignCenterBottom 5 The cell content is aligned center, bottom.
flexAlignRightTop 6 The cell content is aligned right, top.
flexAlignRightCenter 7 The cell content is aligned right, center. This is the default for numbers.
flexAlignRightBottom 8 The cell content is aligned right, bottom.
flexAlignGeneral 9 The cell content is of general alignment. This is "left, center" for strings and "right, center" for numbers.

CellPictureAlignment Property

Constant Value Description
flexAlignLeftTop 0 The picture is aligned left, top.
flexAlignLeftCenter 1 The picture is aligned left, center.
flexAlignLeftBottom 2 The picture is aligned left, bottom.
flexAlignCenterTop 3 The picture is aligned center, top.
flexAlignCenterCenter 4 The picture is aligned center, center.
flexAlignCenterBottom 5 The picture is aligned center, bottom.
flexAlignRightTop 6 The picture is aligned right, top.
flexAlignRightCenter 7 The picture is aligned right, center.
flexAlignRightBottom 8 The picture is aligned right, bottom.

CellTextStyle, TextStyle, TextStyleFixed Properties

Constant Value Description
flexTextFlat 0 The text is normal, flat text.
flexTextRaised 1 The text appears raised.
flexTextInset 2 The text appears inset.
flexTextRaisedLight 3 The text appears slightly raised.
flexTextInsetLight 4 The text appears slightly inset.

CellType Properties (MSHFlexGrid)

Constant Value Description
flexCellTypeStandard 0 The cell is a standard cell.
flexCellTypeFixed 1 The cell is contained in a fixed row or column.
flexCellTypeHeader 2 The cell is a header cell for a band of data.
flexCellTypeIndent 3 The cell is used in a column that indents a band of data.
flexCellTypeUnpopulated 4 The cell is an unpopulated cell.

ColAlignment Properties

Constant Value Description
flexAlignLeftTop 0 The column content is aligned left, top.
flexAlignLeftCenter 1 The column content is aligned left, center. This is the default for strings.
flexAlignLeftBottom 2 The column content is aligned left, bottom.
flexAlignCenterTop 3 The column content is aligned center, top.
flexAlignCenterCenter 4 The column content is aligned center, center.
flexAlignCenterBottom 5 The column content is aligned center, bottom.
flexAlignRightTop 6 The column content is aligned right, top.
flexAlignRightCenter 7 The column content is aligned right, center. This is the default for numbers.
flexAlignRightBottom 8 The column content is aligned right, bottom.
flexAlignGeneral 9 The column content is of general alignment. This is left center for strings and right center for numbers.

ColHeader Property (MSHFlexGrid)

Constant Value Description
flexColHeaderOn 0 The headers display for each band.
flexColHeaderOff 1 No headers display for the band.
flexColHeaderOnce 2 The headers display for the band. If the band is collapsed, only one header displays. Duplicate headers don’t display.

DisplayBandSettings Property (MSHFlexGrid)

Constant Value Description
flexBandDisplayHorizontal 0 The bands within the MSHFlexGrid display horizontally (across). This is the default.
flexBandDisplayVertical 1 The bands within the MSHFlexGrid display vertically (up and down).

DisplayCellSettings Property (MSHFlexGrid)

Constant Value Description
FlexCellDisplayHorizontal 0 The bands within the MSHFlexGrid display horizontally (across).
flexCellDisplayVertical 1 The bands within the MSHFlexGrid display vertically (up and down).

FillStyle Property

Constant Value Description
flexFillSingle 0 Single. Changing Text or any of the cell properties only affects the active cell. This is the default.
flexFillRepeat 1 Repeat. Changing the Text or any of the cell properties affects all selected cells.

FocusRect Property

Constant Value Description
flexFocusNone 0 There is no focus rectangle around the current cell.
flexFocusLight 1 There is a light focus rectangle around the current cell. This is the default.
flexFocusHeavy 2 There is a heavy focus rectangle around the current cell.

GridLines, GridLinesFixed Properties

Constant Value Description
flexGridNone 0 No Lines. There are no lines between cells. In the MSFlexGrid, this is the default for GridLines.
flexGridFlat 1 Lines. The line style between cells is set to normal, flat lines. In the MSHFlexGrid, this is the default for GridLines.
flexGridInset 2 Inset Lines. The line style between cells is set to inset lines. In the MSFlexGrid, this is the default for GridLinesFixed.
flexGridRaised 3 Raised Lines. The line style between cells is set to raised lines. In the MSHFlexGrid, this is the default for GridLinesFixed.

HighLight Property

Constant Value Description
flexHighlightNever 0 There is no highlight on the selected cells.
flexHighlightAlways 1 The selected cells are always highlighted. This is the default.
flexHighlightWithFocus 2 The highlight appears only when the control has focus.

MergeCells Property

Constant Value Description
flexMergeNever 0 Never. The cells containing identical content are not grouped. This is the default.
flexMergeFree 1 Free. Cells with identical content always merge.
flexMergeRestrictRows 2 Restrict Rows. Only adjacent cells (to the left) within the row containing identical content merge.
flexMergeRestrict-Columns 3 Restrict Columns. Only adjacent cells (to the top) within the column containing identical content merge.
flexMergeRestrictBoth 4 Restrict Both. Only adjacent cells within the row (to the left) or column (to the top) containing identical content merge.

MousePointer Property

Constant Value Description
flexDefault 0 The outline of MSHFlexGrid.
flexArrow 1 An arrow pointer.
flexCross 2 A set of crosshairs.
flexIBeam 3 An "I"-shaped beam to allow for text entry.
flexIcon 4 A square within a square.
flexSize 5 A resizing pointer with arrows facing up, down, left, and right.
flexSizeNESW 6 A resizing pointer with arrows pointing to the upper right and lower left.
flexSizeNS 7 A resizing pointer with arrows pointing up and down.
flexSizeNWSE 8 A resizing pointer with arrows pointing to the upper left and lower right.
flexSizeEW 9 A resizing pointer with arrows pointing left and right.
flexUpArrow 10 An arrow pointing up.
flexHourGlass 11 An hourglass symbol.
flexNoDrop 12 A no drop pointer.
flexCustom 13 A custom style pointer.

PictureType Property

Constant Value Description
flexPictureColor 0 This produces a high-quality full-color image.
flexPictureMonochrome 1 This produces a lower-quality, monochrome, image that consumes less memory.

RowSizingSettings Property (MSHFlexGrid)

Constant Value Description
flexRowSizeIndividual 0 Resizing a row changes only the height of the row sized. This is the default.
flexRowSizeAll 1 Resizing a row changes the height of all rows in the MSHFlexGrid.

SelectionMode Property

Constant Value Description
flexSelectionFree 0 Free. This allows individual cells in the MSHFlexGrid to be selected, spreadsheet-style. (Default)
flexSelectionByRow 1 By Row. This forces selections to span entire rows, as in a multi-column list box or record-based display.
flexSelectionByColumn 2 By Column. This forces selections to span entire columns, as if selecting ranges for a chart or fields for sorting.

ScrollBars Property

Constant Value Description
flexScrollNone 0 The MSHFlexGrid has no scroll bars.
flexScrollHorizontal 1 The MSHFlexGrid has a horizontal scroll bar.
flexScrollVertical 2 The MSHFlexGrid has a vertical scroll bar.
flexScrollBoth 3 The MSHFlexGrid has horizontal and vertical scroll bars. This is the default.

Sort Property

Constant Value Description
flexSortNone 0 None. No sorting is performed.
flexSortGenericAscending 1 Generic Ascending. An ascending sort, which estimates whether text is string or number, is performed.
flexSortGenericDescending 2 Generic Descending. A descending sort, which estimates whether text is string or number, is performed.
flexSortNumericAscending 3 Numeric Ascending. An ascending sort, which converts strings to numbers, is performed.
flexSortNumericDescending 4 Numeric Descending. A descending sort, which converts strings to numbers, is performed.
flexSortStringNoCaseAsending 5 String Ascending. An ascending sort using case-insensitive string comparison is performed.
flexSortNoCaseDescending 6 String Descending. A descending sort using case-insensitive string comparison is performed.
flexSortStringAscending 7 String Ascending. An ascending sort using case-sensitive string comparison is performed.
flexSortStringDescending 8 String Descending. A descending sort using case-sensitive string comparison is performed.
flexSortCustom 9 Custom. This uses the Compare event to compare rows.