GetLabelForProperty method (WinStudio scripts)

Applies To

IWSIDOCollection interface

Definition

Returns the caption (label) of a form component bound to a specified IDO collection property. Read-only.

Syntax

object.GetLabelForProperty( string, Boolean )

  Part   Description
object Required. A reference to an IDO collection.
string Required. The name of a property.
Boolean Required. Selection criterion. Several components can be bound to the same property. WinStudio checks components in tab order and selects one based on the specified criterion.
  • TRUE: Retrieve the caption of the first nonhidden component that is bound to the property.
  • FALSE: Retrieve the caption of the first component that is bound to the property.

Remarks

The return value is a string containing the caption of the component.

注意: If the selected component is an edit box with no caption, its label is the first static label appearing before it in the tab order.

Example

Sub Main()
   Application.ShowMessage(ThisForm.CurrentIDOCollection.GetLabelForProperty("LanguageDesc", True))
End Sub