Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 03/08/25 in Posts

  1. loki5100

    What are the performance profilers for Delphi 12?

    Hi, i just made a new performance profiler for delphi 12 that have the advantage to work on iOS and Android too! it's about instrumenting the source code, it's work pretty well. you can found it here : https://github.com/MagicFoundation/Alcinoe?tab=readme-ov-file#alcinoe-code-profiler
  2. Anders Melander

    Problem using SpinEditEx in Delphi 12.1

    FWIW, my wife who speaks "human" tells me that my directness was indeed impolite. So sorry, I guess.
  3. Uwe Raabe

    How do I synchronize two TMemo scrolling? [Solved]

    It depends a bit what the exact use case is, but it probably can be achieved with a class derived from TMemo with the following extensions: type TLinkMemo = class(TMemo) private FLinkedMemo: TLinkMemo; procedure WMVScroll(var Message: TMessage); message WM_VSCROLL; procedure DoScroll(var Message: TMessage); public property LinkedMemo: TLinkMemo read FLinkedMemo write FLinkedMemo; end; procedure TLinkMemo.DoScroll(var Message: TMessage); begin var saveLinkedMemo := FLinkedMemo; try FLinkedMemo := nil; Perform(Message.Msg, Message.WParam, Message.LParam); finally FLinkedMemo := saveLinkedMemo; end; end; procedure TLinkMemo.WMVScroll(var Message: TMessage); begin inherited; if FLinkedMemo <> nil then FLinkedMemo.DoScroll(Message); end; In FormCreate you just assign both LinkedMemo properties: procedure TForm1.FormCreate(Sender: TObject); begin Memo1.LinkedMemo := Memo2; Memo2.LinkedMemo := Memo1; end; To avoid having to register this new control TLinkMemo you can use an interposer class declared before the form, either in the same unit or in a separate unit used in the interface uses clause. type TMemo = class(TLinkMemo); Note, that editing one of the memo will break sync between the controls.
×