## PPGLayout.AddSpacer

### Introduced

v4.2

### Description

Use this method as a tool for fine tuning the layout of a property page. The most basic usage is to provide just a height value to create a horizontal band of blank space. It can also be used to control the horizontal placement of other controls that are part of the same row.

### C# Syntax

    PPGItem PPGLayout.AddSpacer( Int32 in_opt_width, Int32 in_opt_Height );

### Scripting Syntax

    oReturn = PPGLayout.AddSpacer( [Width], [Height] );

### Return Value

PPGItem

### Parameters

Parameter | Type | Description
--- | --- | ---
Width | Long | Width of the spacer (in pixels). It is only necessary to specify this value when there are other controls in the same row. Default Value: 0
Height | Long | Height of the text. If not specified the spacer will be a standard control height (22 pixels) Default Value: 0

### Examples

#### VBScript Example

    dim oNewPset, oLayout, oParam, oItem
    set oNewPset = ActiveSceneRoot.AddProperty( "CustomProperty", false, "SpacerDemo" )
    'We put this parameter between each static so it is clear how much space each is using
    call oNewPset.AddParameter2( "spacer", siDouble )
    set oLayout = oNewPset.PPGLayout
    oLayout.AddStaticText "This is a demo of the PPGLayout.AddSpacer" _
                            & vbCrLf & "Space starts now......."
    oLayout.AddSpacer , 70
    oLayout.AddStaticText "....Space ends"
    'Just a one line gap in the text (can be achieved also
    'with extra vbCrLf directly in the text)
    oLayout.AddSpacer
    oLayout.AddStaticText "Demo of spacers within a row:"
    oLayout.AddRow
            'There is an intentional gap before and after Button 1
            oLayout.AddSpacer 25
            oLayout.AddButton "Btn1", "Button 1"
            oLayout.AddSpacer 75
            oLayout.AddButton "Btn2", "Button 2"
            oLayout.AddButton "Btn3", "Button 3"
    oLayout.EndRow
    InspectObj oNewPSet

### See Also

PPGItem