andyhill Posted January 17, 2021 Posted January 17, 2021 Subject to user interaction we change the contents of a HTMLFrame (our frame has a pre-specified height):- BeginUpdate Clear script EndUpdate The previous contents were many many lines long forcing the user to scroll to bottom, now that we have new contents I want to reposition to the top. How Can We Force Scroll-To-Top in code ? Quote
andyhill Posted January 18, 2021 Author Posted January 18, 2021 Sherzod, please advise - thanks Quote
Sherzod Posted January 18, 2021 Posted January 18, 2021 6 hours ago, andyhill said: Subject to user interaction we change the contents of a HTMLFrame (our frame has a pre-specified height):- BeginUpdate Clear script EndUpdate The previous contents were many many lines long forcing the user to scroll to bottom, now that we have new contents I want to reposition to the top. How Can We Force Scroll-To-Top in code ? Hi, Sorry, do you have a simple testcase to see the "problem"!? Quote
andyhill Posted January 18, 2021 Author Posted January 18, 2021 Set Flag in Server Module BeforeInit to suit (we have multiple frameworks). As stated above clearly, I need to scroll to the top of the HTMLFrame via code at runtime after script update. Project1.zip Quote
andyhill Posted January 18, 2021 Author Posted January 18, 2021 Sherzod, Please advise how to force in code at runtime a horizontal Scroll-To-Top for a HtmlFrame (after the script has been updated) - thanks. Quote
Sherzod Posted January 19, 2021 Posted January 19, 2021 6 hours ago, andyhill said: Please advise how to force in code at runtime a horizontal Scroll-To-Top for a HtmlFrame (after the script has been updated) - thanks. Hi, In your case: procedure TMainForm.UniHTMLFrame1UpdateHtml(Sender: TObject); begin UniPanel2.JSInterface.JSCall('body.setScrollTop', [0]); end; Quote
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.