PPGLayout.AddString operator

Introduced

v4.0

Description

Adds a string to the PPGLayout. This method is very similar to PPGLayout.AddItem but it makes it easier to specify a multi-line string control.

C# Syntax

PPGItem PPGLayout.AddString( String in_ParamName, String in_opt_Label, Boolean in_opt_Multiline, Int32 in_opt_Height );

Scripting Syntax

oReturn = PPGLayout.AddString( ParamName, [Label], [MultiLine], [Height] );

Return Value

PPGItem

Parameters

Parameter Type Description
ParamName String Scripting name of the Parameter. The call does not fail even if no parameter by this name exists. However in that case the control is not drawn as part of the layout.
Label String Most controls have a label, for example the text that appears to the left of a numeric slider. If not specified here, the name of the parameter (see SIObject.Name) or Parameter.ScriptName is shown.
MultiLine Boolean When True, the value of the string parameter is represented with a multi-line edit control. This control is useful for allowing users to write script code or free form text. And, when the control is read-only, it is useful for showing detailed instructions to a user. The control supports scroll bars in the cases where text is larger than the control's width or height.

A multi-line edit has siControlEdit as its PPGItem.Type and uses the siUICX, siUIStyle and siUIClass attributes (see PPGItem.GetAttribute).
Height Long This parameter only applies when the MultiLine argument is true. It specifies the height, in pixels, of the multi-line control. Note: It is not necessary to set the width because the control automatically resizes according to the size of the property page.

Default Value: 120

Examples

VBScript Example

set oCustomProperty = ActiveSceneRoot.AddProperty( "CustomProperty", false, "DescriptionPSet" )
oCustomProperty.AddParameter3 "Description", siString 
oCustomProperty.PPGLayout.AddString "Description",,true, 200 
oCustomProperty.Description = "Here is some " & vbcrlf & "multi-line text"
InspectObj oCustomProperty

See Also

PPGLayout.AddItem