HTML Container Height
HTML Container Height
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
Hi,
Have a look at the following sample Web Page, it uses Sizing(ContentHeight) on the HTML container.
Goodluck,
Danny
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_ComRe: HTML Container Height
Hi,
This works well. Thanks!
This works well. Thanks!