
Top margin in pixels
Member of Table Layout Item (PRIM_TBLO.Item)
Data Type - Integer
Details
The MarginTop property defines the number of pixels the control will move down from the natural position defined by its Row, Column, Alignment and Flow. When Sizing to FitBoth or FitHeight, MarginTop and MarginBottom work in tandem to modify the size of the control. When not Sizing, the use MarginBottom will effectively nullify MarginTop.
Example
This example shows the effects of Top and Bottom.
Begin_Com Role(*EXTENDS #PRIM_WEB) Height(457) Width(889) Layoutmanager(#TableLayout1) Define_Com Class(#PRIM_VS.Style) Name(#Style1) Backgroundbrush(#Brush1) Define_Com Class(#PRIM_VS.SolidBrush) Name(#Brush1) Color(Theme600) Define_Com Class(#PRIM_VS.Style) Name(#Style2) Backgroundbrush(#Brush2) Define_Com Class(#PRIM_VS.SolidBrush) Name(#Brush2) Color(Theme300) Define_Com Class(#PRIM_TBLO) Name(#TableLayout1) Define_Com Class(#PRIM_TBLO.Column) Name(#Column1) Displayposition(1) Parent(#TableLayout1) Width(0.57) Define_Com Class(#PRIM_TBLO.Column) Name(#Column2) Displayposition(2) Parent(#TableLayout1) Width(1.9) Define_Com Class(#PRIM_TBLO.Column) Name(#Column3) Displayposition(3) Parent(#TableLayout1) Width(0.53) Define_Com Class(#PRIM_TBLO.Row) Name(#Row1) Displayposition(1) Parent(#TableLayout1) Height(0.56) Define_Com Class(#PRIM_TBLO.Row) Name(#Row2) Displayposition(2) Parent(#TableLayout1) Height(1.92) Define_Com Class(#PRIM_TBLO.Row) Name(#Row3) Displayposition(3) Parent(#TableLayout1) Height(0.52) Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem1) Alignment(TopLeft) Column(#Column2) Manage(#Label1) Parent(#TableLayout1) Row(#Row2) Sizing(None) Marginbottom(10) Margintop(10) Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem2) Alignment(BottomRight) Column(#Column2) Manage(#Label2) Parent(#TableLayout1) Row(#Row2) Sizing(FitToHeight) Margintop(10) Marginbottom(10) Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem3) Column(#Column2) Manage(#Panel1) Parent(#TableLayout1) Row(#Row2) Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem4) Alignment(TopCenter) Column(#Column2) Manage(#Label3) Parent(#TableLayout1) Row(#Row2) Sizing(None) Margintop(10) Define_Com Class(#PRIM_LABL) Name(#Label1) Caption('Top(10) and Bottom(10) Sizing(None)') Displayposition(1) Ellipses(Word) Height(58) Left(169) Parent(#COM_OWNER) Tabposition(2) Tabstop(False) Top(86) Verticalalignment(Center) Width(159) Alignment(Center) Style(#Style1) Define_Com Class(#PRIM_LABL) Name(#Label2) Caption('Top(10) and Bottom(10) Sizing(FitHeight)') Displayposition(2) Ellipses(Word) Height(272) Left(545) Parent(#COM_OWNER) Tabposition(3) Tabstop(False) Top(96) Verticalalignment(Center) Width(187) Alignment(Center) Style(#Style1) Define_Com Class(#PRIM_PANL) Name(#Panel1) Displayposition(4) Left(169) Parent(#COM_OWNER) Tabposition(4) Tabstop(False) Top(86) Height(292) Width(563) Style(#Style2) Define_Com Class(#PRIM_LABL) Name(#Label3) Caption('Top(10) Sizing(None)') Displayposition(3) Ellipses(Word) Height(64) Left(371) Parent(#COM_OWNER) Tabposition(1) Tabstop(False) Top(96) Verticalalignment(Center) Width(159) Alignment(Center) Style(#Style1) End_Com
See also
LANSA Version 15, April 2020