HTML Container Height

This Q&A forum allows users to post and respond to "How Do I Do ....." questions. Please do not use to report (suspected) errors - you must use your regional help desk for this. The information contained in this forum has not been validated by LANSA and, as such, LANSA cannot guarantee the accuracy of the information.
Post Reply
ajr
Posts: 10
Joined: Wed Aug 22, 2018 9:35 am

HTML Container Height

Post by ajr »

Is there a way to dynamically adjust Html Container's height based on its content?
dannyoorburg
Posts: 177
Joined: Mon Jan 04, 2016 9:50 am
Location: Australia

Re: HTML Container Height

Post by dannyoorburg »

Hi,

Have a look at the following sample Web Page, it uses Sizing(ContentHeight) on the HTML container.

Goodluck,
Danny

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
ajr
Posts: 10
Joined: Wed Aug 22, 2018 9:35 am

Re: HTML Container Height

Post by ajr »

Hi,

This works well. Thanks!
Post Reply