Jump to content

Position cursor at end of htmlmemo


FlavioMacedo

Recommended Posts

I need that when I present the text in the htmlmemo the cursor is positioned at the end of the window and not at the top.
How do I position at the end of the screen with the html?
PS: He is creating a scroll but in the presentation it is positioned on the first line and I need it to be positioned on the last.
If you can help me with this doubt I would appreciate it.
TFA

 

Capturar.PNG

Link to comment
Share on other sites

8 hours ago, FlavioMacedo said:

If you can help me with this doubt I would appreciate it.

Hello,

In addition, try this code for now:

procedure TMainForm.UniButton1Click(Sender: TObject);
begin
  UniHTMLMemo1.Lines.Add('Last Line...<br>');
  UniHTMLMemo1.JSInterface.JSCode('Ext.defer(function(){'#1'.getWin().document.scrollingElement.scrollTop = '#1'.getWin().document.scrollingElement.scrollHeight}, 50);')
end;

 

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...