HTML Container Height
Posted: Wed Aug 22, 2018 9:38 am
Is there a way to dynamically adjust Html Container's height based on its content?
Community Forum for Visual LANSA
https://forum.developer.lansa.com/
Code: Select all
Begin_Com Role(*EXTENDS #PRIM_WEB) LayoutManager(#Layout1)
Define_Com Class(#PRIM_VS.Style) Name(#Style1) BorderBottom(1) BorderLeft(1) BorderRight(1) BorderTop(1)
Define_Com Class(#PRIM_TBLO) Name(#Layout1)
Define_Com Class(#PRIM_TBLO.Row) Name(#Layout1Row1) DisplayPosition(1) Parent(#Layout1)
Define_Com Class(#PRIM_TBLO.Column) Name(#Layout1Column1) DisplayPosition(1) Parent(#Layout1)
Define_Com Class(#PRIM_TBLO.Item) Name(#Layout1Item1) Alignment(TopLeft) Column(#Layout1Column1) Manage(#Button1) Parent(#Layout1) Row(#Layout1Row1) Sizing(None) Flow(Down) MarginLeft(16) MarginTop(16)
Define_Com Class(#PRIM_TBLO.Item) Name(#Layout1Item2) Alignment(TopLeft) Column(#Layout1Column1) Manage(#Html1) Parent(#Layout1) Row(#Layout1Row1) Sizing(ContentHeight) Flow(Down) MarginLeft(16) MarginTop(16)
Define_Com Class(#PRIM_WEB.HtmlContainer) Name(#Html1) Description('Html Container') DisplayPosition(2) Height(200) Parent(#COM_OWNER) TabPosition(1) TabStop(False) Width(150) Top(57) Style(#Style1) Left(16)
Define_Com Class(#PRIM_PHBN) Name(#Button1) DisplayPosition(1) Left(16) Parent(#COM_OWNER) TabPosition(2) Top(16) Caption('Add some more HTML') Width(153)
Evtroutine Handling(#COM_OWNER.CreateInstance)
#Html1.Html := "I contain a line<br>"
#Html1.Html += "and another line <br>"
#Html1.Html += "and another line <br>"
Endroutine
Evtroutine Handling(#Button1.Click)
#Html1.Html += "and another line <br>"
Endroutine
End_Com