10.07.2015 Views

Programming Guide - Actian

Programming Guide - Actian

Programming Guide - Actian

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Table FieldsFor example, the following statement changes the background color of thefourth cell in the name column of the custtable table:field(custtable[4].name).bgcolor = CC_LIGHT_BLUE;Because of the significant overhead entailed in their use, CellAttribute objectsare not automatically created when a table field is created. CellAttributes canbe turned on explicitly with the HasCellAttributes property. Or they are turnedon implicitly by changing a single cell's attribute. They can be freed up byturning off HasCellAttributes, but this resets all attributes back to theprotofield's default attributes.There are no CellAttribute objects for the cells of nested table fields.Table BodyThe table body represents the set of columns in the table field. To access thispart of a table field, use the TableField object's TableBody attribute. Thisattribute's data type is StackField. You can use this attribute to change visualproperties of the table body's line boundary and background. The syntax is:field(tablefield).TableBody.attribute = valueattributeSpecifies an attribute of the StackField object. For example, the followingstatement sets the width of the outline of the table:field(custtable).tablebody.outlinewidth = LW_THIN;The TableBody attribute is also useful in obtaining information about a tablefield (such as column names and data types) that is accessed at runtime butunknown at development time.For a discussion and example of finding which table field a field is in, and thenusing the TableBody attribute to iterate through the Child Fields, seeWhichTableField Method (see page 249).Control ButtonBy default, each table field has a control button that provides the user with amenu of operations that can be performed on the table field. This menuappears when the user clicks the control button.You can remove and add this menu. You can also change which operationsappear on the menu. For instructions about performing these tasks, see HowYou Can Remove or Add the Control Button (see page 241).234 <strong>Programming</strong> <strong>Guide</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!