PC-DMIS 2021.2 Object Library
ReportControls Collection
See Also  Members  Send Topic Feedback | See Object Hierarchy Chart
PCDLRN ActiveX DLL : ReportControls Collection

Glossary Item Box

Description

 

The ReportControls object gives you access to a variety of controls such as buttons, text boxes, and other items that you can add to, remove, and otherwise manipulate on a particular section of a report template.

Object Model

ReportControls CollectionReportControl ObjectApplication ObjectReportControl Object

Remarks

ID_HOB_PCD_GRID_CTRL_OB (GridControlObject) Members

Inside PC-DMIS you use the Properties dialog box to set most properties of the different Reporting objects. However, for the GridControlObject, you use an additional Grid Properties dialog box to set format the grid and its cells with text, font styles, line styles, colors and so forth. You can also set these items programmatically by using these properties and methods.

Note on Colors: Colors are defined by a COLORREF value. When specifying a RGB color, the COLORREF value has this hexadecimal form as a Long value:

0x00BBGGRR

where BB=blue GG=green RR=red

The maximum value for a single byte in the hexadecimal format is 0xFF (or 255 in decimal format).

Properties:

  • NumColumns - This property of type Long defines the number of columns used in the GridControlObject.

  • NumRows - This property of type Long defines the number of rows used in the GridControlObject.

Methods:

  • GetCellData - This returns the current numerical (Long) value in a specified cell. It takes two Long value parameters that specify the row and the column for the cell.
    Syntax:
    Function GetCellData(ByVal Row as Long, ByVal Col as Long) As Long

  • GetCellLeftLineColor - This retrieves the color value for a specified cell's left line. This function returns True if the color value is successfully returned or False otherwise. The COLORREF value is returned in the variable passed as the third parameter. This function takes three parameters. The first is the cell row, the second is the cell column, and the third is the color.
    Syntax:
    Function GetCellLeftLineColor(ByVal Row As Long, ByVal Col As Long, ByVal Color As Long) As Boolean

  • GetCellLineStyle - This retrieves the line style for a specified cell. This function returns True if the line style is successfully returned or False otherwise. It takes four parameters. The first defines the cell's Row, the second defines the cell's Column, the third defines the cell's Line in the cell (1=left line, 2=top line, 3=right line 4=bottom line), the fourth defines the LineStyle (0=None, 1=Thin, 2=Thick, 3=Double, 4=Dotted).
    Syntax:
    Function GetCellLineStyle(ByVal Row As Long, ByVal Col As Long, ByVal Line As Long, ByVal LineStyle as Long) as Boolean

  • GetCellText - This retrieves the current text value in a specified cell. It takes two Long value parameters that specify the row number and the column number to find a particular cell.
    Syntax:
    Function GetCellText(ByVal Row As Long, ByVal Col As Long) As String

  • GetCellTextColor - This retrieves the current color for the text used in a cell. This function returns True if the color value is successfully returned or False otherwise. The color (COLORREF value) is returned in the variable passed as the third parameter. This function takes three parameters. The first is the cell row, the second is the cell column, and the third is the color.
    Syntax:
    Function GetCellTextColor(ByVal Row As Long, ByVal Col As Long, ByVal Color As Long) As Boolean

  • GetCellTextColor - This retrieves the current color for the text used in a cell. This function returns True if the color value is successfully returned or False otherwise. The color (COLORREF value) is returned in the variable passed as the third parameter. This function takes three parameters. The first is the cell row, the second is the cell column, and the third is the color.
    Syntax:
    Function GetCellTextColor(ByVal Row As Long, ByVal Col As Long, ByVal Color As Long) As Boolean

  • GetCellTextValue - This retrieves the current text value in a specified cell. It takes two Long value parameters that specify the row number (first parameter) and the column number (second parameter) to find a particular cell. This differs from GetCellText in that if expressions are part of the text, those expressions are solved.   
    Syntax:  Function GetCellTextValue(ByVal Row As Long, ByVal Col As Long) As String

  • GetCellTopLineColor - This retrieves the color value for a specified cell's top line. This function returns True if the color value is successfully returned or False otherwise. The color (COLORREF value) is returned in the variable passed as the third parameter. This function takes three parameters. The first is the cell row, the second is the cell column, and the third is the color.
    Syntax: Function GetCellTopLineColor(ByVal Row As Long, ByVal Col As Long, ByVal Color As Long) As Boolean

  • IsCellMerged - Returns True if the cell is merged with another cell, False if not. It takes two Long value parameters that specify the row number (first parameter) and the column number (second parameter) to find a particular cell.
    Syntax:
    Function IsCellMerged(ByVal Row As Long, ByVal Col As Long) As Boolean

  • IsCellVisible - Returns True if the cell is visible, False if hidden. It takes two Long value parameters that specify the row number (first parameter) and the column number (second parameter) to find a particular cell.
    Syntax:
     Function IsCellVisible(ByVal Row As Long, ByVal Col As Long) As Boolean

  • IsPrimaryMergedCell - Returns True if the primary cell is merged. False if not. It takes two Long value parameters that specify the row number (first parameter) and the column number (second parameter) to find a particular cell. This differs from IsCellMerged by checking to see if the cell is the first of a merged cell. Only the contents of the primary cell are displayed in the merged cells field.
    Syntax:
    Function IsPrimaryCellMerged(ByVal Row As Long, ByVal Col As Long) As Boolean

  • MergeCells - This merges two cells together. It returns True if the two cells specified are successfully merged, False if not. It takes four Long value parameters that specify two cells to merge.
    Syntax: Function MergeCells(ByVal Row As Long, ByVal Col As Long, ByVal Row2 As Long, ByVal Col2 as Long) as Boolean

  • Move - This moves the object to a new position. It takes two parameters. The first defines a new X position in the editor, the second a new Y position.
    Syntax: Sub Move (ByVal newX As Long, ByVal newY As Long)

  • SetCellBackgroundColor - This sets the background color for the specified cell. It takes three Long value parameters. The first two specify the row number (first parameter) and the column number (second parameter) to find a particular cell. The third specifies the color.
    Syntax: Function SetCellBackgroundColor(ByVal Row As Long, ByVal Col As Long, ByVal Color As Long) As Boolean

  • SetCellData - This sets the specified cell's value and returns True if the cells was successfully given the new value or False otherwise. It takes three Long value parameters. The first two specify the row number (first parameter) and the column number (second parameter) to find a particular cell. The third parameter is the new value.
    Syntax: Function SetCellData(ByVal Row As Long, ByVal Col As Long, ByVal Value As Long) As Boolean

  • SetCellFont - This sets the font style of a particular cell, it returns True if the cell's font was successfully done, or False otherwise. This function takes four parameters. The first two are Long values that specify the cell to change. The third is a string value of the font style to use. The fourth is a Long value that specifies the height of the font.
    Syntax: Function SetCellFont(ByVal Row As Long, ByVal Col As Long, ByVal FontStyle, As String, ByVal Height As Long) As Boolean

  • SetCellLeftLineColor - This sets the color value for a specified cell's left line, it returns True if the cell's left line color properly changed or False otherwise. This function takes three Long value parameters. The first two specify the row number (first parameter) and the column number (second parameter) to find a particular cell. The third parameter is the color value to use.
    Syntax: Function SetCellLeftLineColor(ByVal Row As Long, ByVal Col As Long, ByVal Color As Long) As Boolean

  • SetCellLineColor - This sets the line color for a particular cell. It returns True if the cell's line color is properly changed or False otherwise. This function takes three Long value parameters. The first two specify the row number (first parameter) and the column number (second parameter) to find a particular cell. The third parameter is the color value to use.
    Syntax: Function SetCellLineColor(ByVal Row As Long, ByVal Col As Long, ByVal Color As Long) As Boolean

  • SetCellText - This places the specified text string into the specified cell. It returns True if the cell was successfully inserted or False otherwise. This function takes three parameters. It takes three parameters. The first two are Long values that specify the cell to change. The third is a string value of the text to insert into the cell.  
    Syntax: Function SetCellText(ByVal Row As Long, ByVal Col As Long, ByVal Value As String) As Boolean

  • SetCellTextColor - This sets the text color for a particular cell. It returns True if the cell's text color is properly changed or False otherwise. This function takes three Long value parameters. The first two specify the row number (first parameter) and the column number (second parameter) to find a particular cell. The third parameter is the color value to use.
    Syntax: Function SetCellTextColor(ByVal Row As Long, ByVal Col As Long, ByVal Color As Long) As Boolean

  • SetCellTopLineColor - This sets the color value for a specified cell's top line, it returns True if the cell's top line color properly changes or False otherwise. This function takes three Long value parameters. The first two specify the row number (first parameter) and the column number (second parameter) to find a particular cell. The third parameter is the color value to use.
    Syntax: Function SetCellTopLineColor(ByVal Row As Long, ByVal Col As Long, ByVal Color As Long) As Boolean

  • SetColumnBackgroundColor - This sets the background color value for a specified column in the GridControlObject. It returns True if the column's color properly changes or False otherwise. This function takes two Long value parameters. The first parameter indicates the column to change. The second parameter indicates the color to use.
    Syntax: Function SetColumnBackgroundColor(ByVal Col As Long, ByVal Color As Long) As Boolean

  • SetRowBackgroundColor - This sets the background color value for a specified row in the GridControlObject. It returns True if the row's color properly changes or False otherwise. This function takes two Long value parameters. The first parameter indicates the row to change. The second parameter indicates the color to use.
    Syntax: Function SetRowBackgroundColor(ByVal Row As Long, ByVal Color As Long) As Boolean

  • SetRowLeftLineColor - This sets the left line color value for all the cells in a specified row in the GridControlObject. It returns True if the row's left line color properly changes or False otherwise. This function takes two Long value parameters. The first parameter indicates the row to change. The second parameter is a Long value for the color.
    Syntax: Function SetRowLeftLineColor(ByVal Row As Long, ByVal Color As Long) As Boolean

  • SetRowLineStyle - This sets the line style for the entire row. It returns True if the style was successfully set or False otherwise. This function takes three Long value parameters. The first indicates the row to change, the second defines the cell's Line in the cell (1=left line, 2=top line, 3=right line 4=bottom line), the third defines the LineStyle (0=None, 1=Thin, 2=Thick, 3=Double, 4=Dotted).
    Syntax: Function SetRowLineStyle(ByVal Row As Long, ByVal Line As Long, ByVal LineStyle As Long) As Boolean

  • SetRowTopLineColor - This sets the top line color value for a specified row in the GridControlObject. It returns True if the row's top line color properly changes or False otherwise. This function takes two Long value parameters. The first parameter indicates the row to change. The second parameter indicates the color to use.
    Syntax: Function SetRowTopLineColor(ByVal Row As Long, ByVal Color As Long) As Boolean

See Also

Copyright © 2021. Hexagon Manufacturing Intelligence – Metrology Software, Inc. All Rights Reserved.