Controls (Collection)

Member of:

DashboardSection object

Description:

Contains all the control objects for a Dashboard section. Use Controls (Collection) to access a specific control object. All control object have common controls and methods, but properties that are specific to control returned.

Tip:

All collections have the “Item(NameOrIndex)” method. This is the default method for all collections and returns an item in the collection at a particular index or with a specific name. Use brackets ([]) to represent calls to Item (Method). For example, these statements cause identical behavior: myItem = Documents[1] myItem = Documents.Item(1) myItem = Documents["StartUp.bqy"] myItem = Documents.Item("StartUp.bqy")

Example:

This example shows how to enable disabled controls in Dashboard sections:

var ControlCount = ActiveDocument.Sections["Dashboard"].Controls.Count
for (I = 1 ; I <= ControlCount; I++) 
{
// if the control is disabled then enable it
   if (ActiveDocument.Sections["Dashboard"].Controls[I].Enabled != true)
      ActiveDocument.Sections["Dashboard"].Controls[I].Enabled = true
}

Method:

Item(NameOrIndex) As Control

Properties:

Read-only: Property Count As Number