rafpic62 Posted December 1, 2021 Share Posted December 1, 2021 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 ? Quote Link to comment Share on other sites More sharing options...
andyhill Posted December 1, 2021 Share Posted December 1, 2021 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; Quote Link to comment Share on other sites More sharing options...
rafpic62 Posted December 2, 2021 Author Share Posted December 2, 2021 Unfortunately it doesn't work. Thank you andyhill Quote Link to comment Share on other sites More sharing options...
Sherzod Posted December 2, 2021 Share Posted December 2, 2021 14 hours ago, rafpic62 said: put into the HTML a <div> Hello, Try to assign a custom CSS class to the div 14 hours ago, rafpic62 said: { overflow: auto !important; } And assign a rule to this class as you noted. Or directly in the style attribute... Quote Link to comment Share on other sites More sharing options...
rafpic62 Posted December 2, 2021 Author Share Posted December 2, 2021 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 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.