Type property (WinStudio scripts)

Applies To

IWSFormComponent interface

Definition

Returns an integer indicating a component's type (such as static component, grid component, radio button component, and so on). Read-only.

Syntax

object.Type

  Part   Description
object Required. The name of a valid component object.

Remarks

The return value is an integer code indicating the type of component it is:

Integer Code Component Type
-1 Pointer or None
0 Static display field
1 Editable field
3 Drop-down list
4 List
5 Check box
6 Group box
7 Option ("radio") button
8 Button
9 Default button (DefPushButton)
Remarque: This is a variation of the regular "push button" type, and is not available from the WinStudio Toolbox. To select it, first place a regular Button component type on the form and then use the Type drop-down list in the property sheet for the component to select DefPushButton. For more information, see About Button Components.
10 Menu item
11 Toolbar button
12 Notebook
13 Notebook tab
14 Grid
15 Grid column
16 Graph
18 Multiline edit field
19 Tree
24 Form page
25 User control
26 Date combo box
27 Combo box
38 Hyperlink button
39 Browser
40 Cancel button
Remarque: This is a variation of the regular "push button" type, and is not available from the WinStudio Toolbox. To select it, first place a regular Button component type on the form and then use the Type drop-down list in the property sheet for the component to select CancelPushButton. For more information, see About Button Components.

Example

Sub Main()
   Dim iButtonType As Integer
   Dim iEditType As Integer
   Dim iComboType As Integer
   Dim iGrid As Integer
   iButtonType = ThisForm.Components("button1").Type
   iEditType = ThisForm.Components("edit1").Type
   iComboType = ThisForm.Components("comboBox1").Type
   iGrid = ThisForm.Components("grid1").Type
   Application.ShowMessage("Button type = " & iButtonType & vbLf & _
      "Edit box type = " & iEditType & vbLf & _
      "Combo box type = " & iComboType & vbLf & _
      "Grid type = " & iGrid)
End Sub