Jump to content

TUniHTMLFrame <div> not autoscrolling


rafpic62

Recommended Posts

I have a TUniHtmlFrame on a TUniframe with client side alignment and layout set as 'fit'

I put into the HTML a <div> that is dinamically filled by code and  that will not scroll if the height overflows.

I want the <div> content to scroll vertically in case of overflow.

Analyzing the output through the browser  I find that if I set

#O3C_id-innerCt with the css { overflow: auto !important; }

and 

#O34_id-bodyWrap {overflow:auto !important;}

The scrolling will work correctly.

My question is:

Is possible to set this CSS without using absolute object names like O34_xxxx  or O3C_xxxx ?

 

 

Link to comment
Share on other sites

Not sure if this will help but this is how I get my desired results:-

MainForm.Create

...

          InfoHTMLFrame.ClientEvents.UniEvents.Clear;
          s:= 'beforeInit=function beforeInit(sender, config)'#13#10+
              '{ '#13#10+
              '  config.minHeight = 1850;'#13#10+ // a requirement for me
              '  config.minWidth = 800;'#13#10+   // a requirement for me
              '  config.overflowX = true;'#13#10+  
              //'  config.overflowY = true;'#13#10+ 
              '} ';
          InfoHTMLFrame.ClientEvents.UniEvents.Add(s);

...

Elsewhere in code:-

After updating html script at runtime I call InfoHTMLFrame.ReCalculateAligns;

 

Link to comment
Share on other sites

What I'm experiencing debugging the generated code with the browser is:

x-panel-bodyWrap has the overflow = hidden

If I change this value to auto then the <div> content will be scrolled.

Is there a way to force the x-panel-bodyWrap to have the overflow = auto ?

 

Thank you

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...