HTML Control

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
soa
Posts: 339
Joined: Mon Dec 07, 2015 3:15 pm

HTML Control

Post by soa »

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?
User avatar
Stewart Marshall
Posts: 417
Joined: Thu Nov 05, 2015 5:25 pm

Re: HTML Control

Post by Stewart Marshall »

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%

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
Regards
Stewart Marshall

Independent IT Consultant
www.marshallfloyd.com.au
soa
Posts: 339
Joined: Mon Dec 07, 2015 3:15 pm

Re: HTML Control

Post by soa »

Beautiful
Thanks Stewart
Post Reply