Created 2008-04-11 08:09:37 by Nils G. Svedmyr on NILSXP [ Header and license information ]

Class List


Class cReportControlGrid

Source: CREPORTCONTROLGRID.PKG
Baseclass: cComReportControl


Properties

Procedures

Functions

piDefaultColWidth - Property
The default width to use for columns.
Default: 100

pbShowAllColumnsInFieldChooser - Property
Specifies whether all columns should be available in a FieldChooser object list,
after they have been draged and droped outside the grid object.
Default: True
Note: This can be overriden by the pbShowColumnInFieldChooser property at column level.
You will need to implement a FieldChooser object to be able to get removed
columns back to the grid header.

pbSelectTextOnEdit - Property
Specifies whether an item's text should be auto-selected when an item/cell is clicked upon.
This setting effects the whole grid.
Default: True
Note: There is also a pbColumnSelectTextOnEdit that can override this setting.

pbDeleteAllowed - Property
Specifies whether rows can be deleted from the grid object.
Default: True

piReportGridStyle - Property
Determines how grid lines will be drawn in the grid.
It will be used by the GridLineMode procedure.
Constants:
OLExtpGridNoLines, OLExtpGridSmallDots, OLExtpGridLargeDots, OLExtpGridDashes, OLExtpGridSolid
Default: OLExtpGridSolid

CurrentRowColorNoGridFocus - Property
Background Color to use for the current row, when the grid doesn't have the focus.
Constants:
clDefault, clNone, clAqua, clBlack, clBlue, clDkGray, clFuchsia, clGray, clGreen, clLime, clLtGray, clMaroon, clNavy, clOlive, clPurple, clRed, clSilver, clTeal, clWhite, clYellow
Default : clDefault
Note: The property is not exposed in the Studio's Object Properties dialog. It's just
to obscure to understand in that dialog.

CurrentRowTextColorNoGridFocus - Property
Foreground or text color to use for the current row, when the grid doesn't have the focus.
Constants:
clDefault, clNone, clAqua, clBlack, clBlue, clDkGray, clFuchsia, clGray, clGreen, clLime, clLtGray, clMaroon, clNavy, clOlive, clPurple, clRed, clSilver, clTeal, clWhite, clYellow
Default: clDefault
Note: The property is not exposed in the Studio's Object Properties dialog. It's just
to obscure to understand in that dialog.

piColumnShadowStateColor - Property
Background color to use when a column has its ColumnShadowState set to True.
It also works to use the color selector from the Object Properties dialog in the Studio.
Constants:
clDefault, clNone, clAqua, clBlack, clBlue, clDkGray, clFuchsia, clGray, clGreen, clLime, clLtGray, clMaroon, clNavy, clOlive, clPurple, clRed, clSilver, clTeal, clWhite, clYellow
Default: clDefault

piColumnShadowStateTextColor - Property
Foreground or Text color to use when a column has its ColumnShadowState set to True.
Constants:
clNone, clAqua, clBlack, clBlue, clDkGray, clFuchsia, clGray, clGreen, clLime, clLtGray, clMaroon, clNavy, clOlive, clPurple, clRed, clSilver, clTeal, clWhite, clYellow
Default: clGray

piButtonDownColor - Property
Background color to use when an item/cell is set to pbIsButton,
and is pressed with the left mouse or the space button.
It also works to use the color selector from the Object Properties dialog in the Studio.
Constants:
clNone, clAqua, clBlack, clBlue, clDkGray, clFuchsia, clGray, clGreen, clLime, clLtGray, clMaroon, clNavy, clOlive, clPurple, clRed, clSilver, clTeal, clWhite, clYellow
Default: clAqua

piButtonDownTextColor - Property
Foreground or Text color to use when an item/cell is set to pbIsButton,
and is pressed with the left mouse or the space button.
Constants:
clNone, clAqua, clBlack, clBlue, clDkGray, clFuchsia, clGray, clGreen, clLime, clLtGray, clMaroon, clNavy, clOlive, clPurple, clRed, clSilver, clTeal, clWhite, clYellow
Default: clGray

piButtonBackColor - Property
Background color to use when an item/cell has been set to pbIsButton,
and the button is _not_ pressed.
Constants:
clDefault, clNone, clAqua, clBlack, clBlue, clDkGray, clFuchsia, clGray, clGreen, clLime, clLtGray, clMaroon, clNavy, clOlive, clPurple, clRed, clSilver, clTeal, clWhite, clYellow
Default: clDefault

piButtonForeColor - Property
Foreground or Text color to use when an item/cell has been set to pbIsButton,
and the button is _not_ pressed.
Constants:
clDefault, clNone, clAqua, clBlack, clBlue, clDkGray, clFuchsia, clGray, clGreen, clLime, clLtGray, clMaroon, clNavy, clOlive, clPurple, clRed, clSilver, clTeal, clWhite, clYellow
Default: clNone

pbColumnsGroupable - Property
Determines if columns can be grouped.
Default: False

pbDrawComboButtonInsideCell - Property
The property is used for combo's only. When a column has its ColumnComboState = True,
should the combo drop-down button be drawn within the item/cell?
Default: True

priRowId - Property
Preparation for using rowIDs when using grid with data tables.

Private.pbNavigateOutOfEditMode - Property
pbNavigateOutOfEditMode: Internal - Used to determine if the Tab, Shift Tab or Enter keys
were used to navigate out of a cell that was being edited. This property is used to stop
the navigated to cell from going into edit mode. See OnComRequestEdit.

CreateReportControl - Procedure
The procedure creates several necessary COM objects and connects them to
'their' VDF Proxy objects. It also initilizes all necessary property values.

OnCreate - Procedure
This is a private event. Use OnCreateGrid for custom event.

InitializeGrid - Procedure
The InitializeGrid message will destroy all data in the grid and remove all columns
(and headers).
This is only needed if you already have constructed and filled the grid, but
want to start all over with a different number of columns.
If you only need to remove all data from the grid; use 'Send DeleteData' instead.
Note: There is also a RemoveIcons message that will remove all icons from the Icon
manager, if there is a need to use another set of icons at runtime.

InitializeProperties - Procedure
This message is automatically send when the COM-object grid is created.
It initializes all public properties.

InitPrivateProperties - Procedure
Internal usage only.
It initializes all private properties.

MoveToFirstColumn - Procedure
Keyboard navigation.
If the Home key is pressed, navigate to the current row's first column.

MoveToLastColumn - Procedure
Keyboard navigation.
If the End key is pressed, navigate to the current row's last column.

DoEnter - Procedure
If we are editing a cell then enter acts just like pressing Tab.
If we are not editing then Enter will put the cell into Edit mode.

Up - Procedure
Same as pressing the Up-Arrow key.
This can be used to programatically move the focus.

Down - Procedure
Same as pressing the Down-Arrow key.
This can be used to programatically move the focus.

MoveToColumn Integer iIndex - Procedure
Moves focus to the item of the specified column of the currently selected row.
Parameters:
iIndex - Index of the column to focus.

MoveToRow Integer iIndex - Procedure
Moves the focus and/or selection to a specified row number.

pbFocusSubItems Boolean bState - Procedure Set
*** We have lots of 'Set xxx messages here that are really properties ***
The reason is a timing problem... When properties are set by the Object Properties
dialog in the Studio, they will get written to the cReportControlGrid and thus will get
executed when the object is created upon program start. However, this is to soon!
Most of the properties cannot be set until the COM objects has been
initialized and they don't; until the OnCreate method is executed when the object
is paged.
So how does it work?
Well, when a property is set upon program start the Private.xxx counterpart property
will be set. The Set xxx property won't be set until the OnCreate event is fired
- then all of the properties will be set by the InitializeProperties procedure.
Makes it possible to click on an individual item (else only the row takes focus)
Syntax:
Set pbFocusSubItems to True/False
Default: True
Note: If set to False, all attempts to edit items/cells will fail.

piHeaderColor Integer iColor - Procedure Set
Background color for the header.
Syntax:
Set piHeaderColor to RGBColor
Constants:
clDefault, clNone, clAqua, clBlack, clBlue, clBtnFace, clDkGray, clFuchsia, clGray, clGreen, clLime, clLtGray, clMaroon, clNavy, clOlive, clPurple, clRed, clSilver, clTeal, clWhite, clYellow
The Windows color dialog may also be used to select a color.
Default: clDefault
Note: This only works if piHeaderStyle = OLExtpColumnShaded.

piHeaderTextColor Integer iColor - Procedure Set
Color for the header texts.
Syntax:
Set piHeaderTextColor to RGBColor
Constants:
clDefault, clNone, clAqua, clBlack, clBlue, clBtnFace, clDkGray, clFuchsia, clGray, clGreen, clLime, clLtGray, clMaroon, clNavy, clOlive, clPurple, clRed, clSilver, clTeal, clWhite, clYellow
The Windows color dialog may also be used to select a color.
Default: clDefault
Note: This only works if piHeaderStyle = OLExtpColumnShaded.

piHeaderStyle Integer iStyle - Procedure Set
Visual appearance of grid headers.
Syntax:
Set piHeaderStyle to iStyle
iStyle Constants:
OLExtpColumnShaded, OLExtpColumnExplorer, OLExtpColumnOffice2003, OLExtpColumnOffice2007
Default: OLExtpColumnShaded

pbHotTracking Boolean bState - Procedure Set
Set whether hot tracking is used while moving the mouse over the column header.
Syntax:
Set pbHotTracking to True/False
Default: True
Note: This only work if piHeaderStyle <> OLExtpColumnShaded.

pbInvertColumnOnClick Boolean bState - Procedure Set
Sets whether the column header will appear "inverted" when clicked.
Syntax:
Set pbInvertColumnOnClick to True/False
Default: True

pbShadeSortColumn Boolean bState - Procedure Set
Specifies whether the items/cells of a sorted column will be shaded, when
a column header is clicked to resort the grid.
Syntax:
Set pbShadeSortColumn to True/False
Default: False

piShadeSortColor Integer iColor - Procedure Set
Color for the sorted column.
Syntax:
Set piShadeSortColor to RGBColor
Constants:
clDefault, clNone, clAqua, clBlack, clBlue, clBtnFace, clDkGray, clFuchsia, clGray, clGreen, clLime, clLtGray, clMaroon, clNavy, clOlive, clPurple, clRed, clSilver, clTeal, clWhite, clYellow
The Windows color dialog may also be used to select a color.
Default: clDefault
Note: This only works if pbShadeSortColumn = True.

psSortByText String sText - Procedure Set
SortByText is the text string that is displayed in the tooltip window for column
headers when _no_ tooltip is Set for the column. The tooltip normally reads
"SortBy: + HeaderLabel".
Syntax:
Set psSortByText to "Sort by text"

psNoFieldsAvailableText String sText - Procedure Set
The "No Fields Available" text message displayed in the Field Chooser when no
column headers are present.
Syntax:
Set psNoFieldsAvailableText to "No columns text"
Default: ""

psNoItemsText String sText - Procedure Set
Text message to display when grid is empty.
Syntax:
Set psNoItemsText to "No records text"

psNoGroupByText String sText - Procedure Set
The "No Items" text message displayed in the "Group By" box when no groups has been added.
Syntax:
Set psNoGroupByText to "No group text"

pbDrawSortTriangleAlways Boolean bState - Procedure Set
If DrawSortTriangleAlways is True, the Sort triangle displayed in column headers when a
column is sorted will always be displayed as long as the column size is large enough to
drawn the triangle.
If DrawSortTriangleAlways is False, the triangle will be removed when the column size is
too small to display both the caption and triangle, this will cause only the caption to
be drawn. If the column size is too small to display the entire caption, the caption
will be abbreviated with ellipses.
Syntax:
Set pbDrawSortTriangleAlways to True/False
Default: True

peGridLineColor Integer iColor - Procedure Set
Color of the grid lines.
Syntax:
Set peGridLineColor to RGBColor
Constants:
clNone, clAqua, clBlack, clBlue, clBtnFace, clDkGray, clFuchsia, clGray, clGreen, clLime, clLtGray, clMaroon, clNavy, clOlive, clPurple, clRed, clSilver, clTeal, clWhite, clYellow
Default: clBlue

HeaderJustificationMode Integer iMode - Procedure Set
Aligns the text (and icons) for all header items, iif (if and only if)
pbUseColumnJustificationModeForHeader=False.
Syntax:
Set HeaderJustificationMode to iMode
iMode Constants:
OLExtpAlignmentLeft, OLExtpAlignmentCenter, OLExtpAlignmentRight, OLExtpAlignmentVCenter
OLExtpAlignmentWordBreak, OLExtpAlignmentTextMask, OLExtpAlignmentIconLeft, OLExtpAlignmentIconCenter
OLExtpAlignmentIconRight, OLExtpAlignmentIconTop, OLExtpAlignmentIconVCenter, OLExtpAlignmentIconBottom, OLExtpAlignmentIconMask
Default: OLExtpAlignmentLeft
Note: The pbUseColumnJustificationModeForHeader property _must_ be set to False for
this Property to be used.
You may Use the plus sign (+) to combine constants. You can
override this setting with the HeaderColumnJustificationMode property,
for a particular column.

pbUseColumnJustificationModeForHeader Boolean bState - Procedure Set
The pbUseColumnJustificationModeForHeader property specifies whether the text in the column
header will Use the ColumnJustificationMode setting to align the header label.
Syntax:
Set pbUseColumnJustificationModeForHeader to True/False
Default: True
Note: This setting will override the HeaderJustificationMode if set to True (Default).

AllColumnJustificationMode Integer iMode - Procedure Set
Aligns the text (and icons) of items for all grid columns. (Not headers, see
HeaderJustificationMode, pbUseColumnJustificationModeForHeader and HeaderColumnJustificationMode
for that).
There is also a ColumnJustificationMode property that can be set for a particular column, which
will override this setting.
Syntax:
Set AllColumnJustificationMode to iMode
iMode Constants:
OLExtpAlignmentLeft, OLExtpAlignmentCenter, OLExtpAlignmentRight, OLExtpAlignmentVCenter
OLExtpAlignmentWordBreak, OLExtpAlignmentTextMask, OLExtpAlignmentIconLeft, OLExtpAlignmentIconCenter
OLExtpAlignmentIconRight, OLExtpAlignmentIconTop, OLExtpAlignmentIconVCenter, OLExtpAlignmentIconBottom, OLExtpAlignmentIconMask
Default: OLExtpAlignmentLeft
Note: You may use the plus sign (+) between operators to combine constants in an expression.

pbUseColumnAlignmentWhenEditing Boolean bState - Procedure Set
Specifies whether the ColumnJustificationMode setting is automatically applied to items
for all columns when in edit mode of an item.
Syntax:
Set pbUseColumnAlignmentWhenEditing to True/False
Default: True

GridLineMode Integer iMode - Procedure Set
Determines which grid lines will be displayed in the grid, none, horizontal, vertical or both.
Syntax:
Set GridLineMode to iStyle
iStyle Constants:
Grid_Visible_None, Grid_Visible_Horz, Grid_Visible_Vert, Grid_Visible_Both
Default: Grid_Visible_Both

HeaderVisibleState Boolean bState - Procedure Set
This mimics the VDF Grid class message to show/hide the column headers.
Syntax:
Set HeaderVisibleState to True/False
Default: True

FooterVisibleState Boolean bState - Procedure Set
This message show/hide the column footers.
Syntax:
Set FooterVisibleState to True/False
Default: False
Note:
The column footer is similar to the column header except that it is displayed at the
bottom of the column. Text can be placed in the footer for each column. This can be
used to display data such as column totals. The FooterLabel property is used to
set the text for each column's footer.

pbDrawGridForEmptySpace Boolean bState - Procedure Set
Sets wether grid lines will be drawn after rows to fill the empty space.
Syntax:
Set pbDrawGridForEmptySpace to True/False
Default: True

pbFixedRowHeight Boolean bState - Procedure Set
Make row only one line high or multiple lines per row?
True = One line per row only.
Syntax:
Set pbFixedRowHeight to True/False
Note: If set to True, the max size of button icons that can be used is 16x16 pixels.
Default: False

ResizeColumnState Boolean bState - Procedure Set
Specifies whether grid columns can be resized by dragging the header divider.
Syntax:
Set ResizeColumnState to True/False
Default: True
Note: There is also a ColumnResizable property that can be set on column level.

pbEnableToolTips Boolean bState - Procedure Set
Will enable/disable all tooltips for the entire grid,
including rows and columns.
Syntax:
Set pbEnableToolTips to True/False
Default: True

Typeface String sTypeface - Procedure Set
Will set the typeface for the grid items.
Syntax:
Set Typeface to "Tahoma"
Default: RC_DefaultTypeface
Note: To set the typeface for header and footers; see HeaderTypeface & FooterTypeface

FontSize Integer iSize - Procedure Set
Will set the fontsize for the grid items.
Syntax:
Set FontSize to 10
Default: RC_DefaultFontSize
Note: To set the fontsize for header and footers; see HeaderFontSize & FooterFontSize

HeaderTypeface String sTypeface - Procedure Set
To set the typeface for column headers.
The setting is only used during column creation.
Syntax:
Set HeaderTypeface to "Tahoma"
Default: RC_DefaultTypeface
Note: To set the typeface for items see Typeface and for footers; see FooterTypeface

HeaderFontSize Integer iSize - Procedure Set
To set the fontsize for column headers.
The setting is only used during column creation.
Syntax:
Set HeaderFontSize to 10
Default: RC_DefaultFontSize
Note: To set the fontsize for items see FontSize and footers; see FooterFontSize

FooterTypeface String sTypeface - Procedure Set
To set the typeface for column footers.
The setting is only used during column creation.
Syntax:
Set FooterTypeface to "Tahoma"
Default: RC_DefaultTypeface
Note: To set the typeface for items see Typeface and for headers; see HeaderTypeface

FooterFontSize Integer iSize - Procedure Set
To set the fontsize for column footers.
The setting is only used during column creation.
Syntax:
Set FooterFontSize to 10
Default: RC_DefaultFontSize
Note: To set the fontsize for items see FontSize and headers; see HeaderFontSize

psWatermarkBitmap String sBitmap - Procedure Set
To display a bitmap file as a watermark background for the 'grid' object.
the image file. The bitmap file needs to be in the bitmaps folder
Syntax:
Set psWatermarkBitmap sBitmapFile
Default: None

piWatermarkTransparancy Integer iTransparancy - Procedure Set
A percentage (0-100) of transparancy to use when displaying a watermark bitmap.
Syntax:
Set piWatermarkTransparancy to iTransparancyPercentage
Note: In CodeJock the range is really between 0 to 255, but we use a percentage
here instead to simplify.
Default: 25 (percent)

piWatermarkAlignment Integer iAlignement - Procedure Set
Alignment of the watermark image in the grid. You may use the plus sign (+) to combine constants.
Syntax:
Set piWatermarkAlignment to iAlignment
Constants:
OLExtpReportWatermarkUnknown - Unknown (empty) value.
OLExtpReportWatermarkLeft - Horizontal alignment: left side of report control client rect.
OLExtpReportWatermarkCenter - Horizontal alignment: center of report control client rect.
OLExtpReportWatermarkRight - Horizontal alignment: right side of report control client rect.
OLExtpReportWatermarkHmask - A mask for horizontal alignment flags.
OLExtpReportWatermarkTop - Vertical alignment: top side of report control client rect.
OLExtpReportWatermarkVCenter - Vertical alignment: center of report control client rect.
OLExtpReportWatermarkBottom - Vertical alignment: bottom side of report control client rect.
OLExtpReportWatermarkVmask - A mask for vertical alignment flags.
OLExtpReportWatermarkStretch - Stretch watermark to entire report control client rect.
OLExtpReportWatermarkEnlargeOnly - Watermark can be enlarged only, shrinking is disabled.
OLExtpReportWatermarkShrinkOnly - Watermark can be shrunk only, enlarging is disabled.
OLExtpReportWatermarkPreserveRatio - Watermark aspect ratio is preserved.
Default: OLExtpReportWatermarkUnknown

WatermarkEx String sFile Integer iTransparancy Integer iAlignment - Procedure Set
This procedure is used by the 'Set psWatermarkBitmap', Set piWatermarkTransparancy,
and Set piWatermarkAlignement procedures.
You may want to use this procedure instead to set all three properties at
one command line. For params see the tree individual Set procedures.
Syntax:
Set WatermarkEx to sFile iPercentageTransparancy iAlignmentParameter

Dynamic_Colors Integer i1 Integer i2 - Procedure Set
We need to kill this procedure, else the procedures
Set Color and Set TextColor wont work. (Internal VDF behaviour).

Color Integer iColor - Procedure Set
Background color for the entire grid.
Syntax:
Set Color to RGBColor
Constants:
clDefault, clNone, clAqua, clBlack, clBlue, clBtnFace, clDkGray, clFuchsia, clGray, clGreen, clLime, clLtGray, clMaroon, clNavy, clOlive, clPurple, clRed, clSilver, clTeal, clWhite, clYellow
Note: Individual items/cells can be set with the ItemColor item property.
Default: clNone

TextColor Integer iColor - Procedure Set
Foreground or Text color of the grid.
Syntax:
Set TextColor to RGBColor
Constants:
clNone, clDefault, clAqua, clBlack, clBlue, clBtnFace, clDkGray, clFuchsia, clGray, clGreen, clLime, clLtGray, clMaroon, clNavy, clOlive, clPurple, clRed, clSilver, clTeal, clWhite, clYellow
Default: clBlack

CurrentRowColor Integer iColor - Procedure Set
Sets the background color for the selected row in the grid.
Syntax:
Set CurrentRowColor to RGBColor
Constants:
clDefault, clNone, clAqua, clBlack, clBlue, clBtnFace, clDkGray, clFuchsia, clGray, clGreen, clLime, clLtGray, clMaroon, clNavy, clOlive, clPurple, clRed, clSilver, clTeal, clWhite, clYellow
Default: clDefault
Note: The passed iColor will set the color for the current row. However, if the grid
does not have the focus the CurrentRowColorNoGridFocus color will be
used instead.

CurrentRowTextColor Integer iColor - Procedure Set
Sets the text color for the selected row in the grid.
Syntax:
Set CurrentRowTextColor to RGBColor
Constants:
clDefault, clNone, clAqua, clBlack, clBlue, clBtnFace, clDkGray, clFuchsia, clGray, clGreen, clLime, clLtGray, clMaroon, clNavy, clOlive, clPurple, clRed, clSilver, clTeal, clWhite, clYellow
Default: clDefault
Note: The passed iColor will set the text color for the current row. However, if the grid
does not have the focus the CurrentRowTextColorNoGridFocus color will be
used instead.

HighlightRowState Boolean bState - Procedure Set
When this property is true, the current row will be displayed with the CurrentRowColor.
Syntax:
Set HighlightRowState to True/False
Default: True

piCustomDraw Integer iMode - Procedure Set
The piCustomDraw method is used to specify which of the three custom draw
events should be executed when the rows and items are drawn.
Any combination of the events can be enabled at the same time,
except the OLEExtpCustomDrawNone parameter.
Syntax:
Set piCustomDraw to iMode
iMode Constants:
OLEExtpCustomDrawNone, OLExtpCustomDrawItem, OLExtpCustomMeasureRow, OLExtpCustomBeforeDrawRow, OLExtpCustomDrawPreviewItem
Default: OLEExtpCustomDrawNone
Imporant: The piCustomDraw property setting _must_ precede all other visual appearancy
properties. Else they will not show properly. The

pbAutoColumnSizing Boolean bState - Procedure Set
If True, all columns are sized to fill the entire width of the ReportControl.
When the ReportControl is resized, the Columns will automatically be resized
to fit the new size of the RepotControl.
If False, the columns will Use the width they were assigned when they were created,
or whatever value is stored in the columns width Property. The columns widths may
occupy more or less than the total width of the ReportControl. If the total width
of the columns exceeds the width of the ReportControl, then those columns will not
be visible. When the ReportControl is resized, the size of the columns will not be effected.
Syntax:
Set pbAutoColumnSizing to True/False
Default: True
Note: It is suggested that the developer keeps this property False when designing and
testing an application. As soon as the columns has the right width, this property
can be changed to True, if applicable.

pbAllowColumnRemove Boolean bState - Procedure Set
Specifies whether Columns can be removed from the ReportControl header.
Syntax:
Set pbAllowColumnRemove to True/False
Note: You will need a FieldChooser object to be able to drop removed columns
back to the grid header.
Default: False

pbAllowColumnReorder Boolean bState - Procedure Set
Specifies whether Columns can be moved to another column place.
Syntax:
Set pbAllowColumnReorder to True/False
Default: True

pbAllowAllColumnSort Boolean bState - Procedure Set
Specifies whether the grid can be sorted by clicking on one of the column headers.
This is a grid level setting and effects all columns. There is also a
pbColumnSortable property that can be set at to override this setting
for a particular column.
Syntax:
Set pbAllowAllColumnSort to True/False
Default: True

pbAllowMoveRow Boolean bState - Procedure Set
Specifies whether a row can be moved up and down with the Ctrl+Up_Arrow and
Ctrl+Down_Arrow.
Syntax:
Set pbAllowMoveRow to True/False
Default: True

EnabledState Boolean bState - Procedure Set
Determines if the grid is enabled or disabled. It will override the
pbAllowEdit state. The whole grid will be grayed and the user will not be able
to click anywhere in the grid or headers or use scroll bars.
Syntax:
Set EnabledState to True/False
Default: True

pbAllowEdit Boolean bState - Procedure Set
Determines if grid items/cells are editable or not.
Syntax:
Set pbAllowEdit to True/False
Default: True
Important: There is also an EntryState property that can be set on
Column and/or on item/cell level.
An EntryState set on either Column or Item/Cell level will override
the pbAllowEdit property.
Note: If an item/cell has its pbIsButton property set to True, it can never be edited.
If set to false it is still possible to delete rows (pbDeleteAllowed), use Cut,
Copy & Paste and move rows up and down.

pbEditOnClick Boolean bState - Procedure Set
Determine whether items can be edited by single-clicking on the item.
Default: True
Syntax:
Set pbEditOnClick to True/False
It True, when the item is single-clicked, the item will become editable.
The entire ReportControl or the specific Item must have the pbAllowEdit property set to
True for this to work.
If False, the item must be double-clicked to become editable.
Note: If an item/cell has its pbIsButton property set to True, it can never be edited.

BorderStyle Integer iState - Procedure Set
Specifies the border style of the grid object.
Syntax:
Set BorderStyle to iState
Constants:
OLExtpBorderNone, OLExtpBorderFlat, OLExtpBorderStaticEdge, OLExtpBorderClientEdge, OLExtpBorderFrame
Default: OLExtpBorderClientEdge

SelectMode Integer iState - Procedure Set
Determines how item-level selections are processed.
Syntax:
Set SelectMode to iState
Single_Select - Is used when none or a single selection is allowed. As the user selects
a row any previously selected row will be reset.
Multi_Select - Allows the operator to select one, or many rows.
Default:
Single_Select

piSetVirtualMode Integer iRows - Procedure Set
VirtualMode should be used when there will be a very large Number of rows in the Report
Control. VirtualMode can be used with any number of rows, but it is recommended that
VirtualMode be used If adding more than 10,000 rows. Adding more than 10,000 rows in
normal mode becomes quite slow. Using VirtualMode will dramatically increase performance.
VirtualMode does not require you to manually create the rows and records, all you need to
do is fill in the record data in the BeforeDrawRow event when the record is being displayed.
When using VirtualMode, the rows that will be displayed should be stored internally in an
Array that can easily be accessed by the Report Control.
Default: -1 Means do not use virtual mode.
The following steps should be followed when working in VirtualMode:
1. Create your own array(dim) with the records that you want to Show in the Report Control.
Each "row" in the array will represent a row in the Report Control. Each element in the
"row" of a multi-dimensional array will represent a record in a row.
2. Call piSetVirtualMode, specifying the number of rows that will be in the Report Control.
3. Call the SetCustomDraw method and specify that the xtpBeforeDrawRow event will be
executed. by default, this event is not called.
4. Use the BeforeDrawRow event to manually fill in the records for each row. Only records
modified in the BeforeDrawRow event will become visible.
5. Call Populate to adjust the scroll bars with the current virtual record count.
6. Each Time the Number of rows increases or decreases you must call VirtualMode #ofRows
to indicate the new row count.
Note: You can _not_ group rows or Use the tree view While in virtual mode.

HeaderIcon Integer iColumn Integer iIcon - Procedure Set
To set an icon for a column/header.
Syntax: Set HeaderIcon item iColumn to RC_ButtonNormal
Params:
iColumn is the column/header handle
iIcon is the icon number in an ImageList

HeaderWidth Integer iColumn Integer iWidth - Procedure Set
Set the width of a particular header column.
Syntax:
Set HeaderWidth item iColumn to 300
Note:
If pbAutoColumnSizing=True the iWidth value passed needs to be much larger than
the actual column width to be Set.
It seems like there is some sort of ratio between the grid width and the iWidth passed.
Trial and Error seems to be the way to Set the iWidth if pbAutoColumnSizing=True.
Tip:
Set pbAutoColumnSizing=False while you work out the optimal width for each column. Then
when you are satisfied, change the setting back to True.

ColumnWidth Integer iColumn Integer iWidth - Procedure Set
Same as Set HeaderWidth.

ColumnResizable Integer iColumn Boolean bState - Procedure Set
Specifies whether a grid column can be resized by dragging the header divider.
Syntax:
Set ColumnResizable item iColumn to True/False
Default: True
Note: There is also a 'global' grid level ResizeColumnState property.

HeaderColumnJustificationMode Integer hColumn Integer iMode - Procedure Set
Aligns the text (and icons) for a particular header item.
It will override the HeaderJustificationMode and pbUseColumnJustificationModeForHeader
setting that are for all header items.
Syntax:
Set HeaderColumnJustificationMode item iColumn to iMode
iMode Constants:
OLExtpAlignmentLeft, OLExtpAlignmentCenter, OLExtpAlignmentRight, OLExtpAlignmentVCenter
OLExtpAlignmentWordBreak, OLExtpAlignmentTextMask, OLExtpAlignmentIconLeft, OLExtpAlignmentIconCenter
OLExtpAlignmentIconRight, OLExtpAlignmentIconTop, OLExtpAlignmentIconVCenter, OLExtpAlignmentIconBottom, OLExtpAlignmentIconMask
You may use the plus sign (+) to combine constants in an expression.
Default: OLExtpAlignmentLeft
Note: This setting will override the HeaderJustificationMode and pbUseColumnJustificationModeForHeader
which are a Global settings.

HeaderLabel Integer iColumn String sLabel - Procedure Set
Define text for headers
Syntax:
Set HeaderLabel item iColumn to "Some text"

FooterLabel Integer iColumn String sText - Procedure Set
To set the footer text of the specified column.
Syntax:
Set FooterLabel item iColumn to "Some text"
Note: The FooterVisibleState state must be true.

FooterColumnJustificationMode Integer hColumn Integer iMode - Procedure Set
Aligns the text (and icons) for a particular footer item.
Syntax:
Set FooterColumnJustificationMode item iColumn to iMode
iMode Constants:
OLExtpAlignmentLeft, OLExtpAlignmentCenter, OLExtpAlignmentRight, OLExtpAlignmentVCenter
OLExtpAlignmentWordBreak, OLExtpAlignmentTextMask, OLExtpAlignmentIconLeft, OLExtpAlignmentIconCenter
OLExtpAlignmentIconRight, OLExtpAlignmentIconTop, OLExtpAlignmentIconVCenter, OLExtpAlignmentIconBottom, OLExtpAlignmentIconMask
You may use the plus sign (+) to combine constants in an expression.
Default: OLExtpAlignmentLeft

ColumnJustificationMode Integer iColumn Integer iMode - Procedure Set
The property can be set for a particular column, which
will override the grid level AllColumnJustificationMode setting.
Aligns the text (and icons) for all items of the passed column. (Not the header, see
HeaderColumnJustificationMode for that).
Syntax:
Set ColumnJustificationMode item iColumn to OLExtpAlignmentLeft
Constants (iMode):
OLExtpAlignmentLeft, OLExtpAlignmentCenter, OLExtpAlignmentRight,
OLExtpAlignmentVCenter, OLExtpAlignmentWordBreak, OLExtpAlignmentTextMask,
OLExtpAlignmentIconLeft, OLExtpAlignmentIconCenter, OLExtpAlignmentIconRight,
OLExtpAlignmentIconTop, OLExtpAlignmentIconVCenter, OLExtpAlignmentIconBottom,
OLExtpAlignmentIconMask
Default: OLExtpAlignmentLeft

HeaderToolTip Integer iColumn String sToolTip - Procedure Set
Set the tooltip for a column
Syntax:
Set HeaderToolTip item iColumn to "Some Header tooltip text"

ColumnEditControlStyle Integer iColumn Integer iStyle - Procedure Set
To set which edit mode should be used for items/cells in a column.
Syntax:
Set ColumnEditControlStyle item iColumn to iStyle
Constants for iStyle:
RC_WordBreak Breaks words. The style automatically breaks lines between
words if a word would extend past the edge of the item rectangle.
RC_Single_Line Displays text on a single line only.
RC_Numeric Numeric digits only.
RC_Read_Only Do not allow to edit.
Note:
The property grid level pbSelectTextOnEdit or the pbColumnSelectTextOnEdit property
for the passed column number must be True for this Property to have any effect.
See Also: Specialized versions of this message; ColumnWordbreakState,
ColumnCapsLockState and ColumnNumericState.

ColumnCapsLockState Integer iColumn Boolean bState - Procedure Set
Determines if all text entered to this column from the keyboard will be
converted to upper Case.
Syntax:
Set ColumnCapsLockState item iColumn to True/False
Note: The setting will _not_ format existing text, it will only control
how text can be entered into items/cells for the passed column number.

ColumnWordbreakState Integer iColumn Boolean bState - Procedure Set
Breaks words for all items/cells in the passed column when in edit mode.
The style automatically breaks lines between words if a word would extend
past the edge of the item rectangle.
Syntax:
Set ColumnWordbreakState item iColumn to True/False

ColumnNumericState Integer iColumn Boolean bState - Procedure Set
Determines if all text entered to this column from the keyboard will be
numeric only.
Syntax:
Set ColumnNumericState item iColumn to True/False
Note: It will also set the justification mode to Right.

ColumnCheckboxState Integer iColumn Boolean bState - Procedure Set
To set if column items should be checkboxes.
Syntax:
Set ColumnCheckboxState item iColumn to True/False
Note: There is no setting in CodeJock to set a whole column to checkbox state.
However, there is a item property that can be set. So when the column is
created it will be marked with a tag value of 2 to indicate that it is
a checkbox column. When items/cells are added to a column, a check will
be performed to see if the columns tag value=2, in case the item will be
set accordingly.

ColumnButtonState Integer iColumn Boolean bState - Procedure Set
To set if column items should behave like buttons
Syntax:
Set ColumnButtonState item iColumn to True/False
Note: There is no setting in CodeJock for setting a column to contains push-buttons.
When a column is created it will be marked with a tag value of 1 to indicate
that it is a pushbutton column. When items/cells are added to a column, a check will
be performed to see if the columns tag value=1, in case the item will be
set accordingly.

pbColumnSelectTextOnEdit Integer iColumn Boolean bState - Procedure Set
Column variant of the 'global' grid level property pbSelectTextOnEdit.
It can be used to override the pbSelectTextOnEdit setting for a particular
column.
Syntax:
Set pbColumnSelectTextOnEdit item iColumn to True/False

ColumnAutoSize Integer iColumn Boolean bState - Procedure Set
Specifies if column auto sizing is on or off.
Syntax:
Set ColumnAutoSize item iColumn to True/False
NOTE: When a column is added, the resizable parameter is used to set the value for
BOTH the Resizable and AutoSize Property. If these properties will have a
different value, then you will have to change the required value after the
column has been added. I.e. When the column was added you specified that
Resizable=True, If you require that Autosize = False then you need to Add code
to change this.

ColumnEntryState Integer iColumn Boolean bState - Procedure Set
Determines if a whole column can be edited or not.
Note: There are actually three different levels that can be used to
regulate if items/cells can be edited or not.
1. Set pbAllowEdit at grid level (global for the entire grid)
2. 'Set ColumnEntryState item iColumn to True/FALSE' at column
level will override the pbAllowEdit setting.
3. 'Set EntryState item iItem to True/FALSE' at item
level will override both the pbAllowEdit and EntryState
setting at column level.
Syntax:
Set ColumnEntryState item iColumn to bState

ColumnShadowState Integer iColumn Boolean bState - Procedure Set
Same as Set ColumnEntryState. To be compatable with the Column_Shadow_State
of the VDF DataList class (That is used by the VDF Grid class).
Syntax:
Set ColumnShadowState item iColumn to True/False

ColumnComboState Integer iColumn Boolean bState - Procedure Set
Specifies whether a column of a grid is presented as a combo form.
Syntax:
Set ColumnComboState item iColumn to True/False
Note: The combo-button will be drawn inside the item/cell if the
grid level property pbDrawComboButtonInsideCell is true (the default).

ColumnComboEntryState Integer iColumn Boolean bState - Procedure Set
Determines if column allows entry into the cell or only allows selection
of values from list.
Syntax:
Set ColumnComboEntryState item iColumn to True/False

ColumnPromptMode Integer iColumn Boolean bState - Procedure Set
Specifies whether a column of a grid is presented with a prompt button.
Syntax:
Set ColumnPromptMode item iColumn to True/False

ColumnMaxLength Integer iColumn Integer iLength - Procedure Set
To set the maximum number of characters that can be entered into
the passed column.
This will be of more interest for a db aware class variant.

pbColumnSortable Integer hColumn Boolean bState - Procedure Set
To set if a particular column should be sortable.
Syntax:
Set pbColumnSortable item iItem to True/False
Note: There is also a grid level property 'pbAllowAllColumnSort'
If the pbColumnSortable property is used it will
override the pbAllowAllColumnSort setting.

pbColumnVisible Integer iColumn Boolean bState - Procedure Set
To set if a particular column should be visible or not.
Syntax:
Set pbColumnVisible item iItem to TRUE/False
Note: See also 'pbShowColumnInFieldChooser'
Depending on that setting, this column (if set to False) will be available
or not in the FieldChooser object.

pbShowColumnInFieldChooser Integer iColumn Boolean bState - Procedure Set
Indicates if a particular column will appear in the FieldChooser when the column
is hidden or in the "Group By Box."
Syntax:
Set pbShowColumnInFieldChooser item iColumn to True/False
Note: There is also a pbShowAllColumnsInFieldChooser property at grid level that
will be used for each column where this message is not used.

ColumnItemIndex Integer hColumn Integer iValue - Procedure Set
This is the Index of the column given when added to the ReportControl's collection
of columns. The ColumnItemIndex starts at 0 and increments by 1 for each column in the
ReportControl. The ColumnItemIndex will not change when the columns are moved (dragged and
dropped to another location).
The ColumnItemIndex is used to Find and return a reference to a column. Since the Index of
the column might change frequently, the ColumnItemIndex is used when the column needs to be
accessed.

AddComboConstraintValue Integer iColumn String sValue - Procedure
To fill the combos for the passed column with values.
Adds a constraint to the column's ConstraintsCollection.
Syntax:
Note: The ColumnComboState needs to be true for values to show.

Private.FillComboListObject Integer iItem String sValue String sDescVal Integer iTable RowID riRowId - Procedure
Private helper message for the ColumnComboListObject procedure.

ColumnComboListObject Overloaded Integer iColumn Handle hoList Boolean bDescVal - Procedure Set
To connect a VDF list object with a column's combobox. The list will be
used to fill the comboboxes for the passed column number.
It will work to connect any of these four class objects:
1. ValidationTable
2. DescriptionValidationTable
3. FileValidationTable
4. CodeValidationTable
Syntax: Set ColumnComboListObject item iColumn to hoListObject True/False
Pass False as bDescVal to get the Data_Value of the validation table, or
pass True as bDescVal to get the Description_Value of the validation table.
Note: The ColumnComboState needs to be true for values to show.

ColumnComboListObject Overloaded Integer iColumn Handle hoList - Procedure Set
We overload the ColumnComboListObject procedure to allow a syntax without passing the
boolean parameter.
Else we would have received a runtime error about a missing parameter.

Value Integer iItem String sValue - Procedure Set
To set the value of an individual item/cell.
Syntax:
Set Value item iItem to "Some text"
Note:
We need to set two value here. The ComValue is the value to sort on
when the column header is clicked. The ComCaption is the value that is
passed to the OnClick event. This can be used to figure out which item/cell
was acted upon.

pbBold Integer iItem Boolean bState - Procedure Set
To set an item/cell text to bold.

FontWeight Integer iItem Integer iWeight - Procedure Set
To set an item/cell text to bold.
Note: This is the same as using the pbBold property.
To set an item to BoldFace set the Weight to > 400.
This is put here for legacy purposes.

ItemColor Integer iItem Integer iColor - Procedure Set
Set the background color for an item/cell.
Syntax: Set ItemColor item iItem to iColor
Constants:
clNone, clAqua, clBlack, clBlue, clDkGray, clFuchsia, clGray, clGreen, clLime, clLtGray,
clMaroon, clNavy, clOlive, clPurple, clRed, clSilver, clTeal, clWhite, clYellow
Note: You can also use the VDF RGB function to specify a color.

ItemTextColor Integer iItem Integer iColor - Procedure Set
Set the text or foreground color for an item/cell.
Syntax: Set ItemTextColor item iItem to iColor
Constants:
clNone, clAqua, clBlack, clBlue, clDkGray, clFuchsia, clGray, clGreen, clLime, clLtGray,
clMaroon, clNavy, clOlive, clPurple, clRed, clSilver, clTeal, clWhite, clYellow
Note: You can also use the VDF RGB function to specify a color.

Icon Integer iItem Integer iIcon - Procedure Set
To set an icon for a item/cell in the grid.
Syntax: Set Icon item iItem to RC_ButtonNormal
Params:
iItem is the item number
iIcon is the icon number in an ImageList

ToolTip Integer iItem String sToolTip - Procedure Set
Set the tooltip for an item/cell
Set ToolTip item iItem to "Item tooltip text"

EntryState Integer iItem Boolean bState - Procedure Set
Determines if an item/cell can be edited.
Note: There are actually three different levels that can be used to
regulate if items/cells can be edited or not.
1. Set pbAllowEdit at grid level (global for the entire grid)
2. 'Set ColumnEntryState item iColumn to True/FALSE' at column
level will override the pbAllowEdit setting.
3. 'Set EntryState item iItem to True/FALSE' at item
level will override both the pbAllowEdit and EntryState
setting at column level.
Syntax: Set EntryState item iItem to True/FALSE

ItemShadowState Integer iItem Boolean bState - Procedure Set
To set the ItemShadowState for a single item/cell.
Syntax: Set ItemShadowState item iItem to True/FALSE
Note: This means that the item/cell won't be focusable, and the color is changed.

Extra_State Integer iItem Integer iState - Procedure Set
Procedure for testing various CodeJock settings.

pbIsButton Integer iItem Boolean bState - Procedure Set
Should an item/cell be treated as a button?
Syntax:
Set pbIsButton item iItem to True/False
Note: The enum_list's RC_ButtonNormal and RC_ButtonPressed
icons will be used to display the button in an item/cell.
Syntax: Set pbIsButton item iItem to True/FALSE
If a ReportRecordItem does not have a CheckBox, then setting the ComChecked
property has no effect. However, we can still set this property for our own usage,
namely to keep track of that this is a button item/cell.

CheckboxItemState Integer iItem Boolean bState - Procedure Set
Allows any item to become a checkbox-type item.
Syntax:
Set CheckboxItemState item iItem to True/False

CheckedState Integer iItem Boolean bState - Procedure Set
Reflects whether this item/cell is checked.
Syntax:
Set CheckedState item iItem to True/False

AuxValue Integer iItem String sValue - Procedure Set
Syntax:
Set AuxValue item iItem to sValue
You may use it to store any value you might wish to have associated with the item.

Aux_Value Integer iItem String sValue - Procedure Set
Same as Set AuxValue

CurrentCellColor Integer iColor - Procedure Set
Sets the color of the selected item/cell.
Syntax:
Set CurrentCellColor to RGBColor
Constants:
clNone, clAqua, clBlack, clBlue, clBtnFace, clDkGray, clFuchsia, clGray, clGreen, clLime, clLtGray, clMaroon, clNavy, clOlive, clPurple, clRed, clSilver, clTeal, clWhite, clYellow
Default: clAqua
* TODO: The OnComBeforeDrawRow event has been augmented to set the current cell color.
* However, it paints the whole row
* So for now it doesn't work to set the CurrentCellColor.

CurrentCellTextColor Integer iColor - Procedure Set
The forground or text color of the currently 'active' cell/item.
Syntax:
Set CurrentCellTextColor to RGBColor
* For now it doesn't work to set the CurrentCellColor.

DeleteItem Integer iItem - Procedure
*** TODO:
This isn't finished. It has been put here so we don't forget to
reduce the ItemCount when an item/cell is deleted.

Delete_Item Integer iItem - Procedure
Same as DeleteItem.

CurrentRow Integer iRow - Procedure Set
To move the focus to a particular row.
Syntax:
Set CurrentRow to iInteger

Current_Row Integer iRow - Procedure Set
Same as Set CurrentRow.

CurrentCol Integer iCol - Procedure Set
To move the focus to a particular column. Zero based.
Syntax:
Set CurrentCol to iInteger

Current_Col Integer iCol - Procedure Set
Same as Set CurrentCol.

EditItem Integer iItem - Procedure
The EditItem method is used to set focus to a specific row and column combination so that
that item can be edited.
Syntax:
Send EditItem iItem

EditItemEx Integer iRow Integer iCol - Procedure
Helper procedure for message EditItem. Or it can be used stand alone.
Syntax:
Send EditItemEx iRow iCol
Note: The item that will be edited is the item where the specified Row and Column
intersect. The EditItem method will allow the item to be edited without making the
item editable.
If the item to be edited is not currently in the grid view, the rows will scroll
until the item is visible in the grid view.

DeleteData - Procedure
Deletes all data from the grid. It will not touch the columns.

Delete_Data - Procedure
Same as DeleteData.

RemoveColumns - Procedure
Removes all columns from the ReportControls collection of columns.
Note: This will only delete the columns, the data stored in the Records
will remain unchanged.

DeleteColumns - Procedure
Same as the Remove_Columns message.

RemoveIcons - Procedure
Deletes all icons from the internal icon manager list that has been added with
the AddIcon message.

DeleteIcons - Procedure
Same as the Remove_Icons message.

Remove_Icons - Procedure
Same as the Remove_Icons message.

RemoveIcon Integer iID - Procedure
To remove _one_ icon from the internal icon manager list that has been added with
an AddIcon message.

Remove_Icon Integer iID - Procedure
Same as the Remove_Icon message.

IconRemove Integer iID - Procedure
Same as the Remove_Icon message.

IconMaskColor Integer iColor - Procedure Set
The IconMaskColor sets the color mask of the icons/bitmaps that will be added
to the icon manager list.
By default, the top left corner of the icon/bitmap is used as the mask color. Use the
IconMaskColor property to specify a new mask color.
Syntax:
Set IconMaskColor to iColor
Default: clDefault
Constants:
clNone, clAqua, clBlack, clBlue, clBtnFace, clDkGray, clFuchsia, clGray, clGreen, clLime, clLtGray, clMaroon, clNavy, clOlive, clPurple, clRed, clSilver, clTeal, clWhite, clYellow

IconRefresh - Procedure
Redraws all icons.

AboutBox - Procedure
Display an about box showing the CodeJock Report Control version.

Populate - Procedure
Displays the data put in the items/cells onto the screen.

PrintPreview Boolean bShowPrintDialog - Procedure
Display a print preview window.
Pass True to show print preview dialog before displaying.

ShowPrintPageSetup - Procedure
To Set up printer properties before you use the printer dialog.

PrintReport - Procedure
Printing using the default printer dialog.
Prints the grid content to a printer.

PrintReportWithoutDialog - Procedure
Prints the grid content to a printer, without
displaying a printer dialog.

Request_Delete - Procedure
To Delete the current row (row that has the focus). It is called from OnComKeyDown.
It will also make the toolbar Delete button work.
Note: We cannot change the name of this message because it is being used by VDF internally.

RequestDelete - Procedure
Same as Request_Delete.

Delete - Procedure
The Delete message is send from CodeJock's toolbar buttons.
* TODO. This is an intermediate solution. We should instead enable/disable
the cCJDeleteMenuItem class action. But then we must fully support
'Get DEOInformation (&hoServer) (&bHasRecord) (&bChanged) (&bHasIndex) to bIsDeo'
...and question is if we should mimic 'data-aware' behaviour in this non-data-aware class??

DeleteRow Integer iRow - Procedure
Procedure to delete the passed row number. Is called from Request_Delete.

Delete_Row Integer iRow - Procedure
Same as DeleteRow.

RawDeleteRow Integer iRow - Procedure
Helper procedure for DeleteRow. Does the real delete of the row, but without touching
any visual parts (like moving the focus or making the change seen on screen)

InsertRow Integer iRow Variant vRecord - Procedure
Inserts a row at the passed index. The passed variant
is a COM object pointer to the record that is to be inserted.

RawInsertRow Integer iRow Variant vRecord - Procedure
Helper procedure for Insert_Row. Does the real insert of the row, but without touching
any visual parts (like moving the focus or making the change seen on screen)

MoveRowUp - Procedure
To move the currently selected row up one row.
Press: Ctrl+UpArrow to move the row up one line.
Note: Alt+UpArrow will also work.
* TODO: Does not work properly when ordering of rows has been changed.

MoveRowDown - Procedure
To move the currently selected row down one row.
Press: Ctrl+DownArrow to move the row down one line.
Note: Alt+DownArrow will also work.
* TODO: Does not work properly when ordering of rows has been changed.

Copy - Procedure
*** TODO: There is something wrong when cut/copy/paste is applied to
rows that already has been cut/copied or pasted. Then the
current row seems to point to the totally wrong place, in fact
to the place (I think) where the record originally came from.
Copies the current row to the 'clipboard'.

Cut - Procedure
Cuts the current row to the 'clipboard'.

RawCut - Procedure
Helper procedure for the Cut message.
This message does not deal with visual stuff.
See Cut for that.

Paste - Procedure
Pastes a copied or cut row from the 'clipboard'.

RawPaste - Procedure
Helper procedure for the Paste message.
This message does not deal with visual stuff.
See Paste for that.

OnClick String sCaption - Procedure
Predefined event that is fired when a item/cell is hit by mouse or space key.

OnComMouseDown Short iButton Short iShift Integer ix Integer iy - Procedure
Params:
iButton 1 = left mouse button
iButton 2 = right mouse button
iButton 3 = third mouse button
iShift = is shift key down
ix = x coordinate clicked
iy = y coordinate clicked

OnComMouseUp Short iButton Short iShift Integer ix Integer iy - Procedure
Params:
iButton 1 = left mouse button
iButton 2 = right mouse button
iButton 3 = third mouse button
iShift = is shift key down
ix = x coordinate clicked
iy = y coordinate clicked

OnComPreviewKeyDown Short ByRef iKeyCode Short iShift Boolean ByRef bCancel - Procedure
Handle keyboard navigation duties. Triggered after a key is pressed down but
before it is processed.

OnComKeyDown Short ByRef iKeyCode Short iShift - Procedure
Do the same thing as the MouseUp and Down does when the space key is pressed.
KeyCode is the ANSI keycode value of the key pressed.
Note: It wont work with the enter key because it is ignored by this event.
Shift is the Shift, Ctrl, Alt or any combination of those pressed along with the actual key.
iShift;
1 = Shift, 2 = Ctrl, 3 = Shift+Ctrl, 4 = Alt, 5 = Alt+Shift
6 = Alt+Ctrl, 7 = Shift+Alt+Ctrl

OnComKeyUp Short ByRef iKeyCode Short iShift - Procedure
See OnComKeyDown event for explanation.

OnComFocusChanging Variant llNewRow Variant llNewColumn Variant llNewItem Boolean ByRef llCancel - Procedure
This event is triggered just before a user makes a selection of a cell.

OnComBeforeDrawRow Variant llRow Variant llItem Variant llMetrics - Procedure
This only fires if piSetCustomDraw=OLExtpCustomBeforeDrawRow.
This event is used to change the color of the currently selected item/cell.
* It doesn't (yet) work to set the current item, it sets the whole
selected row!

OnComSelectionChanged - Procedure
Occurs when a row is clicked by a mouse button or when a row is selected by moving
the Up and Down arrow keys. The onComFocusChanging event occurs right _before_ the selection
has changed.

OnComValueChanged Variant llRow Variant llColumn Variant llItem - Procedure
Occurs when the value of a ReportRecordItem has changed.
The ComRedraw is needed if an item/cell value is changed and the mouse
is used to navigate to another cell, and the enter key was not pressed prior
doing so.

OnComValueChanging Variant llRow Variant llColumn Variant llItem - Procedure
Occurs after the value of an item has been changed by the user, but before the
new value has been Set to the item. This allows the new value to be checked
and canceled or modified If needed.
This will be a good candidate to tie together with a data_dictionary when
this class gets to be db-aware.

NextFocusableColumn Integer iColumn Returns Integer - Function
Helper function to decide the next focusable column.
Takes a column number as parameter.
Returns: An integer value that is the first found column number
that is not shadowed or invisible.
Note: The returned value could be less or equal to the passed column
number, in case it indicates that the next focusable item will
be on a next row.

PrevFocusableColumn Integer iColumn Returns Integer - Function
Helper function to decide the previous focusable column.
Takes a column number as parameter to start searching from.
Returns: An integer value that is the first found column number
that is not shadowed or unvisible.
Note: The returned value could be greater or equal to the passed column
number, in case it indicates that the next focusable item will
be on a previous row.

pbFocusSubItems Returns Boolean - Function
See: Procedure Set pbFocusSubItems for an explanation.

piHeaderColor Returns Integer - Function
See: Procedure Set piHeaderColor for an explanation.

piHeaderTextColor Returns Integer - Function
See: Procedure Set piHeaderTextColor for an explanation.

piHeaderStyle Returns Integer - Function
See: Procedure Set piHeaderStyle for an explanation.

pbHotTracking Returns String - Function
See: Procedure Set pbHotTracking for an explanation.

pbInvertColumnOnClick Returns String - Function
See: Procedure Set pbInvertColumnOnClick for an explanation.

pbShadeSortColumn Returns String - Function
See: Procedure Set pbShadeSortColumn for an explanation.

piShadeSortColor Returns Integer - Function
See: Procedure Set piShadeSortColor for an explanation.

psSortByText Returns String - Function
See: Procedure Set psSortByText for an explanation.

psNoFieldsAvailableText Returns Integer - Function
See: Procedure Set psNoFieldsAvailableText for an explanation.

psNoItemsText Returns Integer - Function
See: Procedure Set psNoItemsText for an explanation.

psNoGroupByText Returns Integer - Function
See: Procedure Set psNoGroupByText for an explanation.

pbDrawSortTriangleAlways Returns Integer - Function
See: Procedure Set pbDrawSortTriangleAlways for an explanation.

peGridLineColor Returns Integer - Function
See: Procedure Set peGridLineColor for an explanation.

HeaderJustificationMode Returns Integer - Function
See: Procedure Set HeaderJustificationMode for an explanation.

pbUseColumnJustificationModeForHeader Returns Boolean - Function
See: Procedure Set pbUseColumnJustificationModeForHeader for an explanation.

AllColumnJustificationMode Returns Integer - Function
See: Procedure Set AllColumnJustificationMode for an explanation.

pbUseColumnAlignmentWhenEditing Returns Boolean - Function
See: Procedure pbUseColumnAlignmentWhenEditing for an explanation.

GridLineMode Returns Integer - Function
See: Procedure Set GridLineMode for an explanation.

HeaderVisibleState Returns Boolean - Function
See: Procedure Set HeaderVisibleState for an explanation.

FooterVisibleState Returns Boolean - Function
See: Procedure Set FooterVisibleState for an explanation.

pbDrawGridForEmptySpace Returns Boolean - Function
See: Procedure Set pbDrawGridForEmptySpace for an explanation.

pbFixedRowHeight Returns Boolean - Function
See: Procedure Set pbFixedRowHeight for an explanation.

ResizeColumnState Returns Boolean - Function
See: Procedure Set ResizeColumnState for an explanation.

pbEnableToolTips Returns Boolean - Function
See: Procedure Set pbEnableToolTips for an explanation.

Typeface Returns String - Function
See: Procedure Set Typeface for an explanation.

FontSize Returns String - Function
See: Procedure Set FontSize for an explanation.

HeaderTypeface Returns String - Function
See: Procedure Set HeaderTypeface for an explanation.

HeaderFontSize Returns Integer - Function
See: Procedure Set HeaderFontSize for an explanation.

FooterTypeface Returns String - Function
See: Procedure Set FooterTypeface for an explanation.

FooterFontSize Returns Integer - Function
See: Procedure Set FooterFontSize for an explanation.

psWatermarkBitmap Returns String - Function
See: Procedure Set psWatermarkBitmap for an explanation.

piWatermarkTransparancy Returns Integer - Function
See: Procedure Set piWatermarkTransparancy for an explanation.

piWatermarkAlignment Returns Integer - Function
See: Procedure Set piWatermarkAlignment for an explanation.

Color Returns Integer - Function
See: Procedure Set Color for an explanation.

TextColor Returns Integer - Function
See: Procedure Set TextColor for an explanation.

CurrentRowColor Returns Integer - Function
See: Procedure Set CurrentRowColor for an explanation.

CurrentRowTextColor Returns Integer - Function
See: Procedure Set CurrentRowColor for an explanation.

HighlightRowState Returns Boolean - Function
See: Procedure Set HighlightRowState for an explanation.

piCustomDraw Returns Integer - Function
See: Procedure Set piCustomDraw for an explanation.

pbAutoColumnSizing Returns Boolean - Function
See: Procedure Set pbAutoColumnSizing for an explanation.

pbAllowColumnRemove Returns Boolean - Function
See: Procedure Set pbAllowColumnRemove for an explanation.

pbAllowColumnReorder Returns Boolean - Function
See: Procedure Set pbAllowColumnReorder for an explanation.

pbAllowAllColumnSort Returns Boolean - Function
See: Procedure Set pbAllowAllColumnSort for an explanation.

pbAllowMoveRow Returns Boolean - Function
See: Procedure Set pbAllowMoveRow for an explanation.

EnabledState Returns Boolean - Function
See: Procedure Set EnabledState for an explanation.

pbAllowEdit Returns Boolean - Function
See: Procedure Set pbAllowEdit for an explanation.

pbEditOnClick Returns Boolean - Function
See: Procedure Set pbEditOnClick for an explanation.

CanCopy Returns Boolean - Function
Indicates whether a Copy operation can be performed.
Syntax:
Get CanCopy to bState
Note: If an item/cell has its pbIsButton property set to True, it can never be edited.
There is not a Procedure Set CanCopy

CanCut Returns Boolean - Function
Indicates whether a Cut operation can be performed.
Syntax:
Get CanCut to bState
Note: If an item/cell has its pbIsButton property set to True, it can never be edited.
There is not a Procedure Set CanCut

CanPaste Returns Boolean - Function
Indicates whether a Paste operation can be performed.
Syntax:
Get CanCut to bState
Note: If an item/cell has its pbIsButton property set to True, it can never be edited.
There is not a Procedure Set CanPaste

CanDelete Returns Boolean - Function
Function needed for CodeJock's toolbar buttons (and menu items).
Returns: EnabledState of the grid object.

CanUndo Returns Boolean - Function
Function needed for CodeJock's toolbar buttons (and menu items).
Returns: Always returns False

CanRedo Returns Boolean - Function
Function needed for CodeJock's toolbar buttons (and menu items).
Returns: Always returns False

CanSelect Returns Boolean - Function
Function needed for CodeJock's toolbar buttons (and menu items).
Returns: EnabledState of the grid object.

BorderStyle Returns Integer - Function
See: Procedure Set BorderStyle for an explanation.

SelectMode Returns Integer - Function
See: Procedure Set SelectMode for an explanation.

pbSetVirtualMode Returns Integer - Function
See: Procedure Set piSetVirtualMode for an explanation.

HeaderIcon Integer iColumn Returns Integer - Function
Syntax: Get HeaderIcon item iColumn to iIconNumber

HeaderWidth Integer iColumn Returns Integer - Function
Get the width of a particular header column.
Syntax:
Get HeaderWidth item iColumn to Integer

ColumnWidth Integer iColumn Returns Integer - Function
Same as Set HeaderWidth.

ColumnResizable Integer iColumn Returns Boolean - Function
See: Set ColumnResizable for an explanation.

HeaderColumnJustificationMode Integer hColumn Returns Integer - Function
See: Procedure Set HeaderColumnJustificationMode for an explanation.

HeaderLabel Integer iColumn Returns String - Function
Get the text for a header
Syntax:
Get HeaderLabel item iColumn to sString

FooterLabel Integer iColumn Returns String - Function
See: Procedure Set FooterLabel for an explanation.

FooterColumnJustificationMode Integer hColumn Returns Integer - Function
See: Procedure Set FooterColumnJustificationMode for an explanation.

HeaderToolTip Integer iColumn Returns String - Function
Get the tooltip of a particular header item.
Syntax:
Get HeaderToolTip to sString

ColumnEditControlStyle Integer iColumn Returns Integer - Function
See: Set ColumnEditControlStyle for an explanation.

IsColumnEditOptionsObjectConnected Integer iColumn Returns Handle - Function
Helper function for e.g. ColumnCapsLockState.
Returns a handle to the ItemEditOptions object (VDF-side) if
it was successfull in connecting, for the passed column number
If unsuccessfull it Returns 0.

IsItemEditOptionsObjectConnected Integer iItem Returns Handle - Function
Helper function for item properties.
Returns a handle to the ItemEditOptions object (VDF-side) if
it was successfull in connecting, to the passed item number.
If unsuccessfull it Returns 0.

ColumnCheckboxState Integer iColumn Returns Boolean - Function
See procedure Set ColumnCheckboxState for an explanation.

ColumnButtonState Integer iColumn Returns Boolean - Function
See procedure Set ColumnButtonState for an explanation.

pbColumnSelectTextOnEdit Integer iColumn Returns Boolean - Function
See: Set pbColumnSelectTextOnEdit for an explanation.

ColumnAutoSize Integer iColumn Returns Boolean - Function
See: Procedure Set ColumnAutoSize for an explanation.

ColumnEntryState Integer iColumn Returns Boolean - Function
See: Set ColumnEntryState for an explanation.

ColumnShadowState Integer iColumn Returns Boolean - Function
Syntax: Get ColumnShadowState item iColumn to bState
See: Set ColumnShadowState for an explanation.

pbColumnSortable Integer hColumn Returns Boolean - Function
See: Procedure Set pbColumnSortable for an explanation.

pbColumnVisible Integer iColumn Returns Boolean - Function
See procedure Set pbColumnVisible for an explanation.

pbShowColumnInFieldChooser Integer iColumn Returns Boolean - Function
See procedure Set pbShowColumnInFieldChooser for an explanation.

ColumnItemIndex Integer hColumn Returns Integer - Function
See procedure Set ColumnItemIndex for an explanation.

ColumnFind Integer iIndex Returns Variant - Function
Searches the collection of columns sequentially to find the first column matching
the specified ItemIndex. If no matching Found, NULL is returned.

IsConstraintsCollectionConnected Integer iColumn Returns Handle - Function
Helper function for e.g. AddComboConstraintValue.
Returns a handle to the ConstraintsCollection object (VDF-side) it
it was successfull in connecting.
If unsuccessfull it Returns 0.

Value Integer iItem Returns String - Function
Syntax:
Get Value item iItem to sString

pbBold Integer iItem Returns Boolean - Function
To get if an item/cell text is bold or not.

FontWeight Integer iItem Returns Integer - Function
To get if an item/cell text is bold or not.
Returns:
Integer. If a value of 700 is returned the fontweight is bold.
Else if a value of 400 is returned the fontweight is not bold.

ItemColor Integer iItem Returns Integer - Function
Get the background color of an item/cell.
Syntax: Get ItemColor item iItem to Integer

ItemTextColor Integer iItem Returns Integer - Function
Get the text or foreground color of an item/cell.
Syntax: Get ItemTextColor item iItem to Integer

Icon Integer iItem Returns Integer - Function
To Get an icon for a item/cell in the grid.
Syntax: Get Icon item iItem to iIconNumber

ToolTip Integer iItem Returns String - Function
Get the tooltip for an item/cell

EntryState Integer iItem Returns Boolean - Function
Syntax: Get EntryState item iItem to bState

ItemShadowState Integer iItem Returns Boolean - Function
To get the ItemShadowState for a single item/cell.
Syntax: Get ItemShadowState item iItem to bState

Object_Shadow_State returns integer - Function
We need to augment this VDF function from Shadow_Mixin here,
because it normally queries the ItemShadowState. And it will
do so with a bad timing, when COM object hasn't been paged (created).

pbIsButton Integer iItem Returns Boolean - Function
Is the item/cell a button?

CheckboxItemState Integer iItem Returns Boolean - Function
Is the item/cell a checkbox?
Syntax:
Get CheckboxItemState item iItem to bState

CheckedState Integer iItem Returns Boolean - Function
Is the item/cell checked?
Syntax:
Get CheckedState item iItem to bState

AuxValue Integer iItem Returns String - Function
Syntax:
Get AuxValue item iItem to sValue

Aux_Value Integer iItem Returns String - Function
Same as AuxValue.

ColCount Returns Integer - Function
Returns the total number of columns created for the grid. 1 based.

Col_Count Returns Integer - Function
Note: Same as ColCount

piColumns Returns Integer - Function
Note: Same as ColCount

Column_Count Returns Integer - Function
Note: Same as ColCount

ColumnCount Returns Integer - Function
Note: Same as piColumns

CurrentCellColor Returns Integer - Function
See: Procedure Set CurrentCellColor for an explanation.

CurrentCellTextColor Returns Integer - Function
See: Procedure Set CurrentCellTextColor for an explanation.

RowCount Returns Integer - Function
*** Record versus Row explanation ***
When should I use Record and when should I use Row?
A Record is a bunch of data stored by the Report control. Some data pieces (items)
could be quite large, so Record objects do not "run" across the memory. Its main
responsibility is to maintain the data inside. Not all of each record needs to be
visibly displayed.
Row is a piece of the visual interface. It processes record drawing, user mouse and
keyboard events. Rows could be rebuilt frequently inside the Report control depending
on currently specified Grouping, Sorting, Hiding and other options. Each regular row
has an associated Record. But there are other kinds of rows - for example Group Rows.
They implement another specific behavior.
So If you'd like simply access the data inside the Report control -- you should work
with Records.
Returns the total number of Rows (or Records, it's the same) created for the grid.
One based. Cannot be set.

Row_Count Returns Integer - Function
Same as RowCount.

piRows Returns Integer - Function
Same as RowCount.

piRecords Returns Integer - Function
Same as RowCount.

ItemCount Returns Integer - Function
Returns the total number of items/cells created for the grid. 1 based.
Cannot be set.

Item_Count Returns Integer - Function
Cannot be set. Same as ItemCount.

piCells Returns Integer - Function
Cannot be set. Same as ItemCount.

CurrentItem Returns Integer - Function
Returns the current item/cell as an zero based integer (first item/cell = 0)
Returns -1 if the grid is empty.
*** TODO: Currently there is no way to Set the CurrentItem.

Current_Item Returns Integer - Function
Same as Current_Item.

CurrentRow Returns Integer - Function
To get the row number of the currently focused row.
Returns:
The row Number as an zero based Integer, or -1 If unsuccessfull.
Note: This is not the same as getting the current record, see
function CurrentRecord for that. This is the visual
row that is displayd on screen.
A row can change a lot, depending if it is grouped or not.
But a record is always at 'the same place'.

Current_Row Returns Integer - Function
Same as function CurrentRow.

CurrentRecord Returns Integer - Function
To get the record number of the currently focused row.
Returns:
The record Number as an zero based Integer, or -1 If unsuccessfull.
Note: This is the current record, which may or may not be the same
as the current row. It will be the same iff (if and only if)
no sorting, grouping or copy/cut/paste has been used.

Current_Record Returns Integer - Function
Same as function CurrentRecord.

CurrentCol Returns Integer - Function
Return the row number of the currently focused row.
Returns:
The column number as a zero based Integer, or -1 If unsuccessfull.
The ItemIndex is the Index of the column given when added to the ReportControl's
collection of columns. The ComItemIndex starts at 0 and increments by 1 for each column
in the ReportControl. The ComItemIndex will not change when the columns are moved
(dragged and dropped to another location).

Current_Col Returns Integer - Function
Same as function CurrentCol.

ColumnComObjectFromColumnNumber Integer iColumn Returns Variant - Function
*** Translation functions: ***
Here are a number of functions for translating between a
column,row and item number and the corresponding COM object and back.
COM objects are always of type Variant.
The number (row or column) is always an integer.
The VDF proxy object corresponding to the COM object handle returned, must be
set with the 'Set pvComObject of oVDFProxyObjectName to vComObject' syntax,
_before_ any properties of the proxy object can be manipulated.
Note: These proxy objects already exist and also handles to those objects via
property handles. E.g. phoColumnCollection, phoRecordCollecion, phoRecordItem
Also note that some of these functions automatically connects the COM object to the
VDF proxy object.
- Use this function to get a Column COM object handle from a column number.
Syntax:
Get ColumnComObjectFromColumnIndex iColumn to vColumnComObject
Returns:
A handle to the COM object for the iColumn as a variant.
Returns a NULL variant if unsuccessfull.
Note:
The iColumn passed _must_ be the ItemIndex for the column, which is the
default index of the column. Since the Index of the column might change
frequently, the ItemIndex is used when the column needs to be accessed.

ColumnProxyObjectFromColumnNumber Integer iColumn Returns Handle - Function
Use this function to connect a Column COM object with a VDF proxy object
for the passed Column number. Remember that Column numbers are zero based.
Syntax:
Get ColumnProxyObjectFromColumnNumber iColumn to hColumn
Returns:
A handle to the VDF proxy object for the passed column number.
It will automatically connect the proxy object with the ComObject.
Note:
Returns a Handle=0 if unsuccessfull.

ColumnNumberFromColumnComObject Variant vColumn Returns Integer - Function
This is the reciprocal function of ColumnComObjectFromColumnNumber.
Syntax:
Get ColumnNumberFromColumnComObject vColumn to iColumn
Returns:
An integer which is the column item number for the passed COM object handle.
The column number returned is zero based.
Returns -1 if unsuccessfull.
Note:
It is the ItemIndex that is returned, not Index. See ColumnComObjectFromColumnNumber
function for an explanation.

ColumnNumberFromItemNumber Integer iItem Returns Integer - Function
To get the column number of the passed item number.
Syntax:
Get ColumnNumberFromItemNumber iItem to iColumn

RecordComObjectFromRecordNumber Integer iRecord Returns Variant - Function
To get a Record COM object handle from a record item number.
Syntax:
Get RecordComObjectFromRecordNumber iRecord to vRecordComObject
Returns:
A handle to the COM object for the passed iRecord item as a variant.
Returns a NULL variant if unsuccessfull.

RecordProxyObjectFromRecordNumber Integer iRecord Returns Handle - Function
Returns:
A handle to the VDF proxy object for the passed iRecord number.
The VDF Record object will automatically be connected to the Com Object.
Note:
Returns a Handle=0 if unsuccessfull.

RecordNumberFromRecordComObject Variant vRecord Returns Integer - Function
This is the reciprocal function of RecordComObjectFromRecordNumber.
Syntax:
Get RecordNumberFromRecordComObject vRecordComObject to iRecord
Returns:
An integer which is the record number for the passed COM object handle.
The record number returned is zero based.
Returns -1 if unsuccessfull.

RowComObjectFromRecordNumber Integer iRecord Returns Variant - Function
To get a Row COM object handle from a record Number.
Syntax:
Get RowComObjectFromRecordNumber iRecord to vRowComObject
Returns:
A handle to the COM object for the iRecord as a variant.
Returns a NULL variant if unsuccessfull.
Note: A row and a record may be the same, but not always.
If Grouping, Sorting, Hiding is used or a row has been moved the two
will _not_ be the same.

RowComObjectFromRowNumber Integer iRow Returns Variant - Function
To get a Row COM object handle from a row Number.
Syntax:
Get RowComObjectFromRowNumber iRow to vRowComObject
Returns:
A handle to the COM object for the iRow as a variant.
Returns a NULL variant if unsuccessfull.
Note: Because rows can e.g. be grouped, the object isn't necessary
what you want (or in the place you think it is).

RowProxyObjectFromRowNumber Integer iRow Returns Handle - Function
Returns:
A handle to the VDF proxy object for the passed iRow number.
The VDF Row object will automatically be connected to the Com Object.
Note:
Returns a Handle=0 if unsuccessfull.

RowNumberFromItemNumber Integer iItem Returns Integer - Function
To get the row number of the passed item number.
Syntax:
Get RowNumberFromItemNumber iItem to iRow

ItemComObjectFromItemNumber Integer iItem Returns Variant - Function
To get an Item COM object handle from an item Number.
Syntax:
Get ItemComObjectFromItemNumber iItem to vItemComObject
Returns:
A handle to the COM object for the iItem as a variant.
Returns a NULL variant if unsuccessfull.

ItemProxyObjectFromItemNumber Integer iItem Returns Handle - Function
Returns:
A handle to the VDF proxy object for the passed iItem number.
The VDF Item object will be automatically connected to the Com Object.
Note:
Returns a Handle=0 if unsuccessfull.

ItemNumberFromItemComObject Variant vItem Returns Integer - Function
This is the reciprocal function of ItemNumberFromItemComObject.
Syntax:
Get ItemNumberFromItemComObject vItemComObject to iItem
Returns:
An integer which is the item number for the passed COM object handle.
The item number returned is zero based.
Returns -1 if unsuccessfull.

ItemNumberFromItemProxyObject Handle hItem Returns Integer - Function
Syntax:
Get ItemNumberFromItemProxyObject hItem to iItem
Returns:
An integer which is the item number for the passed VDF Proxy object handle.
The item number returned is zero based.
Returns -1 if unsuccessfull.
Note: The pvComObject of the VDF proxy object passed (hItem) must
have been Set prior using this function.

IconMaskColor Returns Integer - Function
The IconMaskColor property gets the color mask of the icons/bitmaps that will be added
to the icon manager list.
Syntax:
Get IconMastColor to iColor

IconIsAlphaIconsSupported Returns Boolean - Function
Determines if the Operating System supports 32-bit Alpha Icons.
Can only be 'get'.

IconCount Returns Integer - Function
The number of icons in the collection of images (icon manager list).

AddImage String sImage Integer iId Returns Integer - Function
Adds an image to the imagelist.
We assume that this is an icon unless the .bmp extension is passed.
Returns True if success
Parameters:
sImage: The name of the Icon or bitmap file without path.
iId: The Id is an arbitrarely integer ID value, but see also Enum_List at top
of this package named RO_xxx, etc. This id is used when you want to use
the icon in a column or item/cell.

AddIcon String sImage Integer iId Returns Integer - Function
Same as the AddImage function.

AddImageType Boolean bIsIcon String sImage Integer iId Returns Integer - Function
Helper function for the AddImage message. Can also be used standalone.
Adds an image to the internal imagelist. Pass if bmp or icon and an image filename.
This will first look for the resource then search for the file in the Bitmap file path.
returns True if success.
Note: Although eImageType have five constants defined for it; xtpImageNormal, xtpImageDisabled
xtpImageHot, xtpImageChecked and xtpImagePressed,
the only one that works is xtpImageNormal. (Else the image won't be loaded).

AddColumn String sHeaderLabel Returns Handle - Function
Adds a new column to the grid object (Report Control)
Syntax:
Get AddColumn "Header label" to hColumn
Returns: A handle to the newly created column.
After using this function the returned handle can be used to set the
HeaderIcon, HeaderToolTip, HeaderJustificationMode et.al. for the column.
Note: If you would like to add a header tooltip, width and if the column should be
resizable, all at the same command line, use the AddColumnEx function instead.
The reason for this Function is that it is easy to use if only the header
label needs to be set, and it is in line with the AddRow and AddItem functions

Add_Column Overloaded Returns Handle - Function
Same as AddColumn, but without the sHeaderlabel parameter.

AddColumnEx String sHeaderText String sToolTip Integer iWidth Boolean bResizable Returns Handle - Function
Adds a new column to the grid object (Report Control)
If a ColumnCollection object has _not_ previously been created, it will be
automatically created, because without it a column cannot be created.
Takes four parameters; sHeaderText, sTooltipText, iColumnWidth and if it is allowed to
resize the column width at runtime (True/False).
Returns the handle to the newly created object that can be used to change more
properties for the column.
Syntax:
Get AddColumnEx "Header text" "Tooltip text" iWidth bResizable
Note:
If pbAutoColumnSizing=True the iWidth value passed needs to be much larger than
the actual column width to be Set.
It seems like there is some sort of ratio between the grid width and the iWidth passed.
Trial and Error seems to be the way to Set the iWidth if pbAutoColumnSizing=True.

AddRow Returns Handle - Function
Creates a new record (and a new row) and returns the handle that is used
to add items/cells for the grid object (Report Control).
Returns:
A handle to the newly created row that is used to add items/cells
to the grid.
Note: You would not normally use this message because it is used automatically
by the AddItem function.

Add_Row Returns Handle - Function
Same as AddRow.

AddItem String sValue Returns Handle - Function
Adds a new item/cell to the grid object (Report Control).
Syntax:
Get Additem "Item value" to hItem
Returns:
A handle to the newly created item/cell.
Note: The returned handle can be used to set a whole range of item properties,
with the syntax: E.g. 'Set pbBold item hItem to True'

Add_Item String sValue Returns Handle - Function
Same as AddItem.

NumberOfItemsInRecord Handle hRecord Returns Integer - Function
Helper function for AddItem.
How many items exist in a passed record/row?
Syntax:
Get NumberOfItemsInRecord hRecord to iItems
Note: One based.


Header and license information

****************************************************************************
$Module type: CLASS
$Module name: cReportControlGrid.pkg
$Author : Nils G. Svedmyr
Created : 2008-01-29 @ 19:41
Note : Although this text is included in the cReportControlGrid.htm help doc in the
Help folder, it might be easier to read it in the Studio.
Description : A wrapper class for the CodeJock's ReportControl component.
Which is really a fancy grid class (not dbgrid).
Used is also the wrapper help classes; cReportControlGridColumn,
which is a column in the grid, and the cReportControlGridItem
class, which is an item/cell in the grid.
The two classes are included as 'Use xxx.pkg'
Usage : Drag a cReportControlGrid from the Base Controls section of the Studio's Class Palette
onto a view (or dbview) object. A source skeleton will get created for you with the
most important sections to get started. You can use the Studio's Object Properties
to set a whole range of properties for the grid.
In Procedure AddIcons;
Add icons to be used by the grid headers and for buttons in the grid
with the AddImage function:
'Get AddImage "MyName.ico" RC_IconHeaderColumn to iRetval'
where the RC_IconHeaderColumn is a number in the icon list to be
referred to. Is a constant declared in cReportControlGridDefines.pkg
In Procedure AddColumns;
Add columns to the grid with the AddColumn function:
'Get AddColumn "Header label" to hColumn
You can use the returned handle (hColumn) to set more properties for the column.
In a Procedure FillGrid;
Add items/cells with the AddItem function:
'Get AddItem "Some value" to iItem'
You can use the returned handle (iItem) to set properties for that particular
item/cell. E.g. Set pbIsButton item iItem to True
Finally, when you are done with creating all items/cells you _must_
end with a:
'Send Populate'
The message will display all your elements on the screen, else the grid will
show up blank!
Properties Note:
The property names that does not start with 'pb' or 'pi', are properties that
mimics existing VDF properties used by (mostly) the grid class.
Important: NONE of the messages use underscores in their name!
That means that familiar properties like e.g. Header_Justification_Mode
and Highlight_Row_State instead are named;
HeaderJustificationMode and HighlightRowState, respectively.
WHY? Well, I have always disliked those underscored message names,
because the naming always seemed to be inconsistent, giving you more grief
than being of help reading them.
Documentation: See also 'ClassReference.htm' in the Help folder. This is essential reading for
all available procedures and functions.
Syntax :
Use cReportControlGrid.pkg
Object oReportControlGrid is a cReportControlGrid
// *** Object based properties ***
Set Size to height width
Set Location to Row Column
Set HeaderVisibleState to True|False
Set HeaderJustificationMode to iMode
Set pbUseColumnJustificationModeForHeader to True|False
Set ResizeColumnState to True|False
Set pbAllowColumnReorder to True|False
Set pbAllowColumnRemove to True|False
Set pbAllowAllColumnSort to True|False
Set pbAllowMoveRow to True|False
Set pbShowAllColumnsInFieldChooser to True|False
Set pbAutoColumnSizing to True|False
Set pbColumnsGroupable to True|False // Not yet implemented.
Set pbFocusSubItems to True|False
Set pbDrawGridForEmptySpace to True|False
Set pbFixedRowHeight to True|False
Set pbEnableToolTips to True|False
Set Typeface to "Tahoma"
Set Fontsize to 8
Set HeaderTypeface to "Tahoma"
Set HeaderFontsize to 8
Set FooterTypeface to "Tahoma"
Set FooterFontsize to 8
Set psWatermarkBitmap to sFilename
Set piWatermarkAlignment to iAlignmentStyle
Set piWatermarkTransparancy to iPercentage
Set BorderStyle to iBorderStyle
Set HighlightRowState to True|False
Set piReportGridStyle to iGridStyle
Set GridLineMode to iGridVisibleMode
Set peGridLineColor to RGBColor
Set Color to RGBColor
Set TextColor to RGBColor
Set CurrentRowColor to RGBColor
Set CurrentRowTextColor to RGBColor
Set CurrentRowColorNoGridFocus to RGBColor
Set CurrentRowTextColorNoGridFocus to RGBColor
Set EnabledState to True|False
Set pbAllowEdit to True|False
Set pbDeleteAllowed to True|False
Set pbEditOnClick to True|False
Set SelectMode to Single|Multi
Set pbUseColumnAlignmentWhenEditing to True|False
Set HeaderVisibleState to True|False
Set piHeaderColor to RGBColor
Set piHeaderTextColor to RGBColor
Set piHeaderStyle to HeaderStyle
Set pbHotTracking to True|False
Set pbInvertColumnOnClick to True|False
Set pbShadeSortColumn to True|False
Set piShadeSortColor to RGBColor
Set pbDrawSortTriangleAlways to True|False
Set AllColumnJustificationMode to iAlignmentStyle
Set psSortByText to "Sort by text string"
Set psNoFieldsAvailableText to "The headerlist is empty"
Set psNoItemsText to "No rows to display"
Set psNoGroupByText to "No groups to display"
Set piColumnShadowStateColor to RGBColor
Set piColumnShadowStateTextColor to RGBColor
Set piButtonDownColor to RGBColor
Set piButtonDownTextColor to RGBColor
Set piButtonBackColor to RGBColor
Set piButtonForeColor to RGBColor
// *** Column Properties: ***
Get AddColumn to col#
Set HeaderLabel item col# to "Header label text"
Set HeaderToolTip item col# to "Header tooltip text"
Set HeaderColumnJustificationMode item col# to iMode
Set HeaderIcon item col# to iIcon
Set HeaderWidth item col# to iWidth
Set ColumnJustificationMode item col# to iMode
Set ColumnEntryState item col# to True|False
Set ColumnShadowState item col# to True|False
Set ColumnCapsLockState item col# to True|False
Set ColumnWordbreakState item col# to True|False
Set ColumnNumericState item col# to True|False
Set ColumnComboState item col# to True|False
Set ColumnCheckboxState item col# to True|False
Set ColumnButtonState item col# to True|False
Set ColumnComboEntryState item col# to True|False
Set ColumnPromptMode item col# to True|False
Set pbColumnSortable item col# to True|False
Set pbColumnVisible item col# to True|False
Set pbShowColumnInFieldChooser item col# to True|False
// You may also set footer values for each column
Set FooterLabel item col# to "Footer label text"
Set FooterColumnJustificationMode item col# to iMode
// *** Item Properties: ***
Get AddItem "ItemValue" to item#
Set Value item item# to Value
Set ItemColor item item# to RGBColor
Set ItemTextColor item item# to RGBColor
Set ItemShadowState item item# to True|False
Set CheckboxItemState item item# to True|False
Set CheckedState item item# to True|False
Set pbBold item item# to True|False
Set Icon item item# to iIconID
Set ToolTip item item# to "Item tooltip value"
Set EntryState item item# to True|False
Set pbIsButton item item# to True|False
Set AuxValue item item# to Value
End_Object // oReportControlGrid
$Rev History
2008-01-29 Module header created.
2008-03-05 Documentation done including the .htm help (Located in the Help folder.)
Note: It is not many properties listed in the html help properties section.
However, there are a lot more properties available! You need to check above and
the procedures and functions that starts with 'pi, pb and ps' to see
them all. The reason is that many of the properties are just defined as
a pair of a procedure and a function, instead of a 'simple' property line.
It has been created in such a way to make it possible to be able to set
properties for the grid, before it has been paged - Else we would be
getting runtime errors because the COM objects does not yet exist.
This doesn't matter for the Studio; properties will show up properly in
the object properties dialog, it's more a 'defect' in CodeSpy that is tool
used to create the html documentation for this project. It cannot correctly
detect a procedure/function pair as a property.
2008-03-09 Changed class names and AddColumn syntax(es)
2008-03-16 Major reorganization of the VDF proxy object handling and how messages
communicate with the COM objects through these proxy objects.
****************************************************************************
Note: If you don't have version 11.2.2 of the Report Control, you may use the 11.2.1 instead.
Of course you cannot Use both packages at the same time.
If you Use version 11.2.1 you wont be able to use the piWatermarkAlignment function
(If you Set it in your code, it will be ignored.)
Use Codejock.ReportControl.v11.2.1.pkg