HTML Control
HTML Control
I'm using a HTML control where the contents exceed the size of the control. Is there a way of displaying scroll bars when this happens?
- Stewart Marshall
- Posts: 417
- Joined: Thu Nov 05, 2015 5:25 pm
Re: HTML Control
An HTMLContainer is just a DIV. It's entirely up to you how the contents behave.
So, if you need scrollbars, wrap your HTML in a DIV with OverFlow:Auto and height and width of 100%
Regards
So, if you need scrollbars, wrap your HTML in a DIV with OverFlow:Auto and height and width of 100%
Code: Select all
Begin_Com Role(*EXTENDS #PRIM_WEB) Width(825) Height(473) LayoutManager(#Layout1)
Define_Com Class(#PRIM_TBLO) Name(#Layout1)
Define_Com Class(#PRIM_TBLO.Column) Name(#Column1) DisplayPosition(1) Parent(#Layout1)
Define_Com Class(#PRIM_TBLO.Column) Name(#Column2) DisplayPosition(2) Parent(#Layout1)
Define_Com Class(#PRIM_TBLO.Column) Name(#Column3) DisplayPosition(3) Parent(#Layout1)
Define_Com Class(#PRIM_TBLO.Row) Name(#Row1) DisplayPosition(1) Parent(#Layout1)
Define_Com Class(#PRIM_TBLO.Row) Name(#Row2) DisplayPosition(2) Parent(#Layout1)
Define_Com Class(#PRIM_TBLO.Row) Name(#Row3) DisplayPosition(3) Parent(#Layout1)
Define_Com Class(#PRIM_TBLO.Item) Name(#LayoutItem1) Column(#Column2) Manage(#Html1) Parent(#Layout1) Row(#Row2)
Define_Com Class(#PRIM_WEB.HtmlContainer) Name(#Html1) Description('Html Container') DisplayPosition(1) Height(158) Parent(#COM_OWNER) TabPosition(1) TabStop(False) Width(275) Left(275) Top(158)
Evtroutine Handling(#Com_owner.CreateInstance)
#Html1.Html := ('<div style="width:100%;height:100%;overflow:auto"> <button style="width:250px;height:250px">Big button</button> </div>').Substitute( #Html1.Width.AsString #Html1.Height.AsString )
Endroutine
End_Com