| 4D v18WP Get subsection | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 
 | 
    4D v18
 WP Get subsection 
         | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| WP Get subsection ( targetObj ) | (wpSection ; subSectionType ) -> 戻り値 | ||||||||
| 引数 | 型 | 説明 | ||||||
| targetObj | Object |   | レンジまたは要素 | |||||
| wpSection | Object |   | 4D Write Pro セクション | |||||
| subSectionType | 倍長整数 |   | サブセクションのタイプ(wk first page, wk left page, または wk right page) | |||||
| 戻り値 | Object |   | サブセクション | |||||
WP Get subsection コマンドは、targetObj 引数で指定したレンジまたは要素と交差する最初のサブセクション、あるいはwpSection 引数のセクション内のsubSectionType 型のサブセクションを返します。
レンジまたは要素がヘッダーあるいはフッターに所属している場合、WP Get subsection はそのヘッダーあるいはフッターが割り当てられているサブセクションを返します。ヘッダーまたはフッターがサブセクションに割り当てられていない場合、null オブジェクトが返されます。
レンジまたは要素がアンカーされた画像に所属している場合、エラーが返されます。
| 定数 | 型 | 値 | 
| wk first page | 倍長整数 | 1 | 
| wk left page | 倍長整数 | 2 | 
| wk right page | 倍長整数 | 3 | 
左ページに青い背景を適用したい場合を考えます:
 C_OBJECT($section;$subsection)
  //最初のセクションを取得
 $section:=WP Get section(wpDoc;1)
  //最初のセクションの左ページサブセクションへを取得
 $subsection:=WP Get subsection($section;wk left page)
 
  //サブセクションが存在する場合、背景を青に設定
 If($subsection#Null)
    WP SET ATTRIBUTES($subsection;wk background color;"#87CEEB")
 Else
    ALERT("Please, create left and right subsections.")
 End if
	プロダクト: 4D
	テーマ: 4D Write Proランゲージ
	番号: 
        1582
        
        
        
	
	初出: 4D v17 R3
	
	
	4D Write Proリファレンス ( 4D v18)
	
	
	
 コメントを追加
コメントを追加