Please enable JavaScript to view this site.

DAQFactory User's Guide

Navigation: 7 Pages and Components > 7.18 The Components > 7.18.2 Displays

7.18.2.6 Data Table Component

Scroll Prev Top Next More

The table component will display multiple values in column format similar to the tables used within DAQFactory for adding channels, conversions and the like.  Each column in the table will display the result of an expression.  In the properties for the table component is a table for specifying the details of each column in the component.  Each row in the properties table corresponds to a column in the component.  The order of columns is determined by the order of the rows in the properties table.  You can move rows up and down by selecting the row and clicking either Move Up or Move Down.

Column Properties:

Expression: the result of the expression determines what will be displayed in the column.  The result can be either an array of numbers or strings.

Title: the title displayed at the top of the column.  You can optionally turn of title display using the Display Titles? option described below.

Width: the width of the column in pixels.

Prec: the precision of the numbers displayed in the column.  This is ignored if the expression results in string data.

Align: the alignment of the data within the cell.  This can be left, right, or center.  The title is aligned accordingly.

F Color: the foreground color of the text displayed.

B Color: the background color of the column.

Table Properties:

Row Height: the height of each row.  The columns will word wrap if the row height is large enough to allow multiple lines of text per row.

Show Grid: if checked, a grid is drawn around each cell in the table.

Grid Color: the color of the grid, if drawn.

Font: the font used to display all the text in the table.

Font Size: the font size in points used to display all the text in the table.

Ellipsis?: if checked, then an ellipsis (...) is displayed at the end of any text that does not fit inside its cell in the table.

Display Titles?: if checked, then a row is displayed with the titles for each column.

Title Fore Color: the color of the text used to display the titles.

Title Back Color: the color of the background of the title row.

Component Variables and Functions (advanced):  

Please see the section on Component Names for a description on how to use these.

AddColumn(expression, [title], [width], [precision], [alignment], [color], [bkcolor]): Adds a column to the table with the given parameters.  Only the expression parameter is required.  Alignment should be "left", "right" or "center".  To create a new table dynamically, call ClearColumns() then AddColumn() for each column in your new table.

ClearColumns(): this function will clear all the columns, emptying the table.  Typically you will use this before the AddColumn() function to create a table dynamically.

DisplayEllipsis

DisplayTitles

strFontName

FontSize

GridLinesColor

LeftCol: read only: the left most displayed column numbered from 0.  

RowHeight

expRowForeColor / expRowBackColor: these are expressions that when evaluated should return an array of colors (encoded typically using RGB()) to determine the foreground and background colors for a particular row.  Typically, the resulting array of colors should be the same size as the array of data your are displaying.  If a color doesn't exist for a particular row, or the color evaluates to a negative number for that row, then the default column color is used.

ShowGrid

TitleBackColor

TitleForeColor

TopRow: the row number currently displayed at the top of the table.  As you scroll down, this number will change to indicate the top row displayed, numbered from 0.  Unlike LeftCol, you can write to this variable and adjust the vertical scrolling