Item

concerns

 

The Item property retrieves a control of the collection by its name or ordinal position.

 

Syntax

Item(NameOrIndex [, OnClient])

Return value

Type

Description

Control

The found control in the collection

Parameter

Use

Name

Type

Passing

Description

Required

NameOrIndex

Variant

ByVal

Numeric index (1-base) or the name of the control to retrieve.

Optional

OnClient

Boolean

ByVal

True, if the control must be searched by client.

Default is True.

 

Notes:

 

On the server side, the controls of a form are treated as they appear in the form designer of a form of a class. For example, a Control of type TCEPanels.SubForm usually has no more children. However, at run time, when this control includes another form, additional controls are dynamically available there. Therefore, passing True on the OnClient parameter can specify that the controls should be searched through the client. This causes an additional round trip and is therefore significantly slower. However, in these special situations, these dynamically generated elements can also be found.