ArcPad Scripting Object Model
Item Method
See Also  Example  Send comments on this topic.
Index
Required. A Variant that specifies the name or index of the applet.
Applets Collection : Item Method

Glossary Item Box

Description

Returns the specified applet object.

Syntax

Set variable = object.Item ( Index )

Parameters

Index
Required. A Variant that specifies the name or index of the applet.

Return Type

Applet Object

Remarks

Index is a variant specifying the applet to reference. It can be either the index or the name of the applet. For example, if your ArcPad application contains an applet named "MyApplet" that has an index of 2, the following two lines of code will yield the same result:

       Set theApplet = Application.Applets.Item(2)
       Set theApplet = Application.Applets.Item("MyApplet")
  
The Item method is the default method for the Applets collection. Therefore, the following two lines of code will yield the same result:

       Set theApplet = Application.Applets.Item("MyApplet")
       Set theApplet = Application.Applets("MyApplet")

Example

Displays the number of forms present in the first applet loaded in a message box.
Get Applet Forms Example (VBScript)Copy Code
Sub GetApplet1Forms
      Dim objMyApplet, objTheForms
      Set objMyApplet = Application.Applets.Item (1)
      Set objTheForms = objMyApplet.Forms
      Application.MessageBox "The applet has " & objTheForms.Count & " forms", apInformation
End Sub
Get Applet Forms Example (JScript)Copy Code
function GetApplet1Forms()
{
      var objMyApplet = Application.Applets.Item(1);
      objTheForms = objMyApplet.Forms;
      Application.MessageBox("The applet has " + objTheForms.Count + " forms");
}

See Also

© 2012 All Rights Reserved.