stiaan Posted March 31, 2016 Share Posted March 31, 2016 Hi Can anybody please assist: I'm busy developing a UniGUI system that captures the realtime output of a console application and is then displayed it in a TUniHTMLMemo control. I need to be able to scroll as the text comes in from the console app. The application successfully captures the output, but I need to scroll and show the latest line. Much appreciated! Regards Stiaan Quote Link to comment Share on other sites More sharing options...
BantuKumar Posted March 31, 2016 Share Posted March 31, 2016 Hi Can anybody please assist: I'm busy developing a UniGUI system that captures the realtime output of a console application and is then displayed it in a TUniHTMLMemo control. I need to be able to scroll as the text comes in from the console app. The application successfully captures the output, but I need to scroll and show the latest line. Much appreciated! Regards Stiaan Hi, You can use ScrollBars property of TUniHTMLMemo to deal with scroll. There you can supply ssBoth, ssNone, ssHorizontal or ssVirtical. Best Regards, 1 Quote Link to comment Share on other sites More sharing options...
stiaan Posted April 1, 2016 Author Share Posted April 1, 2016 Hi Thanks for the reply, but I'm looking more for the ability to scroll programmatically to the last line. Regards Stiaan Quote Link to comment Share on other sites More sharing options...
Sherzod Posted April 1, 2016 Share Posted April 1, 2016 scroll programmatically to the last line. Hi, For now try: procedure TMainForm.UniButton1Click(Sender: TObject); var HTMLMemoJSName: string; begin HTMLMemoJSName := UniHTMLMemo1.JSName; UniHTMLMemo1.Lines.Add('scroll programmatically to the last line... '); UniSession.AddJS('setTimeout(function(){' + HTMLMemoJSName + '.iframeEl.dom.contentWindow.scrollTo(0, ' + HTMLMemoJSName + '.iframeEl.dom.contentWindow.document.body.scrollHeight)}, 50)'); end; Best regards. Quote Link to comment Share on other sites More sharing options...
stiaan Posted April 4, 2016 Author Share Posted April 4, 2016 Hi This worked perfectly! Thanks for the excellent input! Regards Stiaan 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.