
v4.2
プロパティページのレイアウトを微調整するために、このメソッドを使用します。高さの値のみを指定して横方向に帯状のブランク領域を作成するのが最も基本的な使用法です。同じ行の一部である他のコントロールの横の位置を制御するためにも使用できます。
oReturn = PPGLayout.AddSpacer( [Width], [Height] ); |
| パラメータ | タイプ | 詳細 |
|---|---|---|
| 幅 | Long | 空間の幅(ピクセル)同じ行に他のコントロールが存在する場合ののみこの値を指定する必要があります。
デフォルト値: 0 |
| 高さ | Long | テキストの高さ。指定しない場合、空間は標準のコントロールの高さになります(22ピクセル)。
デフォルト値: 0 |
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
|