ActiveField - QuickField API help

QuickField Student Edition free download     Contacts

ActiveField Technology

Objects Overview

Hierarchy Chart

How to Start: Application Object

How to work with Problems

How to work with Model

How to work with Data

How to Analyze Results

Objects

Properties

Methods

Columns Object

Properties

Methods

Summary

Collection of columns in the TableWindow.

Details

The Columns collection of TableColumn objects contains all the columns in the TableWindow. It is accessible by the Columns property of the TableWindow object. The Columns collection's methods and properties allow iterating through the columns, adding and removing columns from the collection and controlling the table caption.

As any collection the Columns has a Count property that returns the total number of columns in the table, and Item method returns the desired TableColumn from the collection. Using the Item method you can index a column by its number (the number of the first (leftmost) column is 1, the last (rightmost) has the number equal to Columns.Count), or by the physical quantity it shows as QfQuantity. The Item is a default method of the Columns collection, so its can be simply omitted. You cannot change the order that columns appear in the table - it is hard coded for each problem type.

Columns collection provides the following methods and properties:

Iterate through the columns

Item (index as Long,
quantity as QfQuantity)
method as TableColumn

Returns the TableColumn by its index (serial number from the left) or by the physical quantity it shows.

Count property as Long.
(read-only)

Returns the number of columns in the table.

Add and remove columns

Add (quantity as QfQuantity) method as TableColumn.

Adds a new TableColumn for the given quantity or returns an existing one.

Remove (col as TableColumn) method.

Removes the column from the table.

Adjust the table caption appearance

SetWidth (w as QfColWidth)
method as TableColumn

Adjusts the width of all the table columns by the column header width or by the values width.

ShowNotation property as Boolean.
(read and write)

Turns on and off the quantity notation in the table caption.

ShowUnit property as Boolean.
(read and write)

Turns on and off the quantity unit in the table caption.

ShowDescription property as Boolean.
(read and write)

Turns on and off the quantity verbal description in the table caption.

The following example creates the TableWindow, shows the verbal description of the quantities and adjusts the columns width by header. Then it removes the first 10 columns from the table and inserts a column that shows the point distance from the contour starting point.

Dim res As QuickField.Result
Dim cont As QuickField.Contour
    .......
Dim table As QuickField.TableWindow
Dim col As QuickField.TableColumn
Set table = res.GetTable(cont)
table.Columns.ShowDescription = True
table.Columns.SetWidth (qfByHeader)
For i = 1 To 10
    Set col = table.Columns(1)        ' get the leftmost column
    If Not col Is Nothing Then
        table.Columns.Remove col        ' and remove it
    End If
Next
Set col = table.Columns.Add(qfCoordL)