You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

[ |../../index.htm#lansa/l4wdev06_1825.htm]
現在地:
<ac:structured-macro ac:name="anchor" ac:schema-version="1" ac:macro-id="1d077871-63ad-4f3a-bef2-5df391e30f17"><ac:parameter ac:name="">_Toc137629701</ac:parameter></ac:structured-macro>添付レイアウト
添付レイアウトは、コンテナを5つのセルに分割します。中央のセルは、使用可能なスペースをすべて埋めるよう広がります。
添付レイアウトにコンポーネントを追加すると、レイアウトにドロップした位置で配置される場所が決定します。そのため、添付レイアウトのフォームの上部にドロップされたコンポーネントは、Attachmentの位置がTopに割り当てられ、下部にドロップされたコンポーネントは、Attachmentの位置がBottomに割り当てられます。レイアウト・ヘルパーを使用して位置を変更できます。
フォームには5つのプッシュ・ボタンがあり、それぞれが5つのAttachmentの位置の1つに割り当てられています。

これはレイアウトのソースです。
Function Options(*DIRECT)
Begin_Com Role(*EXTENDS #PRIM_FORM) Height(304) Layoutmanager(#ATLM_1) Left(303) Top(239) Width(454) Define_Com Class(#PRIM_ATLM) Name(#ATLM_1) Define_Com Class(#PRIM_PHBN) Name(#PHBN_1) Caption('Button 1') Displayposition(1) Left(0) Parent(#COM_OWNER) Tabposition(1) Top(0) Width(446) Define_Com Class(#PRIM_ATLI) Name(#ATLI_1) Attachment(Top) Manage(#PHBN_1) Parent(#ATLM_1) Define_Com Class(#PRIM_PHBN) Name(#PHBN_2) Caption('Button 2') Displayposition(2) Height(227) Left(366) Parent(#COM_OWNER) Tabposition(2) Top(25) Define_Com Class(#PRIM_ATLI) Name(#ATLI_2) Attachment(Right) Manage(#PHBN_2) Parent(#ATLM_1) Define_Com Class(#PRIM_PHBN) Name(#PHBN_3) Caption('Button 3') Displayposition(3) Left(0) Parent(#COM_OWNER) Tabposition(3) Top(252) Width(446) Define_Com Class(#PRIM_ATLI) Name(#ATLI_3) Attachment(Bottom) Manage(#PHBN_3) Parent(#ATLM_1) Define_Com Class(#PRIM_PHBN) Name(#PHBN_4) Caption('Button 4') Displayposition(4) Height(227) Left(0) Parent(#COM_OWNER) Tabposition(4) Top(25) Define_Com Class(#PRIM_ATLI) Name(#ATLI_4) Attachment(Left) Manage(#PHBN_4) Parent(#ATLM_1) Define_Com Class(#PRIM_PHBN) Name(#PHBN_5) Caption('Button 5') Displayposition(5) Height(227) Left(80) Parent(#COM_OWNER) Tabposition(5) Top(25) Width(286) Define_Com Class(#PRIM_ATLI) Name(#ATLI_5) Attachment(Center) Manage(#PHBN_5) Parent(#ATLM_1) End_Com
 
レイアウト・ヘルパーではこのように表示されます(表示するには、コンテナの[詳細]タブで、LayoutManagerプロパティの省略符ボタンをクリックします)。

中央のコンポーネントは、他のコンポーネントが使用していないスペースのサイズにあわせて常に変更されます。
一般的な手法では、Attachmentの位置にパネル・コンポーネントを配置し、他のコンポーネントをパネルに追加します。
複数のコンポーネントに同じAttachmentの位置が割り当てられている場合は、Displaypositionが最も低いコンポーネントだけが表示され、他のコンポーネントは非表示になります。
一般的な添付レイアウトの使用法は、Top、Center、Bottomの位置だけを使用するものです。

  • Topの位置には、パネルとツールバー・ボタンで作成されるツールバーが置かれます。
  • Centreの位置には、さまざまなフィールドのパネルが置かれます。
  • Bottomの位置には、ステータス・バーが置かれます。

[ |../../index.htm#lansa/l4wdev06_1825.htm]

  • No labels