Recent

Author Topic: How do I catch the scrolling event of TMemo?  (Read 637 times)

chenyuchih

  • Jr. Member
  • **
  • Posts: 79
How do I catch the scrolling event of TMemo?
« on: May 19, 2020, 06:18:23 am »
Hello,

I am designing a GUI program to compare text contents. I have 2 Memos(Memo1 and Memo2) and would like to make them scrolling identically. For example, when I scrolling(horizontally or vertically) one memo, the other one would move to the same position automatically. I know how to get/set the position of the scrollbars, but there's no onScroll event in TMemo. Could anyone give me a hint? Thanks in advance.

Best Regards,
chenyuchih

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 924
  • Former Delphi 1-7, 10.2 User
Re: How do I catch the scrolling event of TMemo?
« Reply #1 on: May 19, 2020, 07:07:25 am »
You fail to mention the operating system(s) for which this is required. You might want to read How to use the Forums.

If Windows is your poison, then see this mailing list thread.
o Lazarus v2.1.0 r63871, FPC v3.3.1 r46864, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (VMware Fusion VM)
o FPC 3.0.4, FreeBSD 12.2-STABLE r365646 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

chenyuchih

  • Jr. Member
  • **
  • Posts: 79
Re: How do I catch the scrolling event of TMemo?
« Reply #2 on: May 19, 2020, 10:11:41 am »
You fail to mention the operating system(s) for which this is required. You might want to read How to use the Forums.

If Windows is your poison, then see this mailing list thread.

Sorry for that. Currently I use Lazarus 1.8.4 / FPC 3.0.4 official release under Windows 10.

And thank you. I will investigate the method in your link.

BTW, is this question OS-relevant? I mean, will I have to use different solution for different OS?
« Last Edit: May 19, 2020, 10:17:14 am by chenyuchih »

trev

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 924
  • Former Delphi 1-7, 10.2 User
Re: How do I catch the scrolling event of TMemo?
« Reply #3 on: May 19, 2020, 11:04:56 am »
BTW, is this question OS-relevant? I mean, will I have to use different solution for different OS?

I'm afraid so :(
o Lazarus v2.1.0 r63871, FPC v3.3.1 r46864, macOS 10.14.6 (with sup update), Xcode 11.3.1
o Lazarus v2.1.0 r61574, FPC v3.3.1 r42318, FreeBSD 12.1 amd64 (VMware Fusion VM)
o FPC 3.0.4, FreeBSD 12.2-STABLE r365646 amd64
o Lazarus v2.1.0 r61574, FPC v3.0.4, Ubuntu 18.04 (Parallels VM)

 

TinyPortal © 2005-2018