MarginBottom プロパティ

LANSA

MarginBottom プロパティ

MarginBottomはツリー項目の下により多くの間隔をあけます。

MarginBottomプロパティを使用して、ツリー・ビュー項目の下の下部余白を増やします。 マージンはピクセルで指定します。

通常はツリー・ビューにより提供される自動間隔を変更する必要はありませんが、場合によっては余白を調整することでより見栄えがよくなることもあります。

次のコードをコピー・貼り付けして、ツリー・ビューの上部と下部余白が変更される方法を確認してください。

FUNCTION options(*DIRECT) 

Begin_Com Role(*EXTENDS #PRIM_FORM) Clientheight(313) Clientwidth(568) Formposition(ScreenCenter) Left(336) Top(133) Width(576)
Define_Com Class(#PRIM_TRVW) Name(#TRVW_1) Displayposition(1) Height(289) Left(24) Parent(#COM_OWNER) Tabposition(1) Top(8) Width(289)
Define_Com Class(#PRIM_TVCL) Name(#TVCL_1) Keyposition(1) Level(1) Parent(#TRVW_1) Source(#DEPTMENT) Visible(False)
Define_Com Class(#PRIM_TVCL) Name(#TVCL_3) Keyposition(1) Level(2) Parent(#TRVW_1) Source(#SECTION) Visible(False)
Define_Com Class(#PRIM_TVCL) Name(#TVCL_2) Displayposition(1) Image(#VI_DEPTCL) Imageexpanded(#VI_DEPTOP) Level(1) Parent(#TRVW_1) Source(#DEPTDESC)
Define_Com Class(#PRIM_TVCL) Name(#TVCL_4) Displayposition(1) Image(#VI_SECTCL) Imageexpanded(#VI_SECTOP) Level(2) Parent(#TRVW_1) Source(#SECDESC)
Define_Com Class(#PRIM_TVCL) Name(#TVCL_5) Keyposition(1) Level(3) Parent(#TRVW_1) Source(#EMPNO) Visible(False)
Define_Com Class(#PRIM_TVCL) Name(#TVCL_6) Displayposition(1) Image(#VI_EMPLOY) Level(3) Parent(#TRVW_1) Source(#SURNAME)
Define_Com Class(#STD_NUM.Visual) Name(#STD_NUM) Caption('Bottom margin of current item:') Displayposition(2) Height(19) Labeltype(Caption) Left(344) Parent(#COM_OWNER) Tabposition(2) Top(40) Usepicklist(False) Width(182)
Define_Com Class(#STD_NUM.Visual) Name(#STD_NUM_1) Caption('Top margin of current item:') Displayposition(3) Height(19) Labeltype(Caption) Left(344) Parent(#COM_OWNER) Tabposition(3) Top(16) Usepicklist(False) Width(185)
EVTROUTINE handling(#TRVW_1.Initialize) options(*NOCLEARMESSAGES *NOCLEARERRORS)
SELECT fields(#EMPNO #SURNAME #DEPTMENT #SECTION) from_file(PSLMST)
FETCH fields(#DEPTDESC) from_file(DEPTAB) with_key(#DEPTMENT)
FETCH fields(#SECDESC) from_file(SECTAB) with_key(#DEPTMENT #SECTION)
ADD_ENTRY to_list(#TRVW_1)
ENDSELECT
ENDROUTINE
EVTROUTINE HANDLING(#STD_NUM_1.Changed) OPTIONS(*NOCLEARMESSAGES *NOCLEARERRORS)
Set Com(#TRVW_1.CurrentItem) Margintop(#std_num_1.value)
ENDROUTINE
EVTROUTINE HANDLING(#STD_NUM.Changed) OPTIONS(*NOCLEARMESSAGES *NOCLEARERRORS)
Set Com(#TRVW_1.CurrentItem) MarginBottom(#std_num.value)
ENDROUTINE
END_COM