TreeSetCacheRecordCap method (WinStudio scripts)

Applies To

IWSFormComponent interface, tree objects

Definition

Sets the maximum number of IDO collections to be retrieved when building each tree node.

Syntax

object.TreeSetCacheRecordCap( integer )

text

Part Description
object Required. A reference to a valid tree component object.
integer Required. The setting 0 specifies that all records are to be queried into the tree (unlimited). The setting -1 specifies that the default cap for the IDO is to be applied. Any positive integer specifies the maximum nodes at each level.

Remarks

By default, IDO collections in a tree component use the cap that applies to drop-down lists. This cap is set from the View menu, User Preferences window, Runtime tab, Caps section, Drop-downs settings.

This method overrides the drop-down list setting for a particular tree component. To change the cap dynamically, refresh the tree using the TreeRefresh method after you have changed the cap.

Example

Sub Main()
    Rem Set the cap to 10 nodes per level.
    ThisForm.Components("OrdersTree").TreeSetCacheRecordCap(10)
    ThisForm.Components("OrdersTree").TreeRefresh
End Sub