Recent

Author Topic: [SOLVED] PopupMenu Sender  (Read 279 times)

pcurtis

  • Sr. Member
  • ****
  • Posts: 419
[SOLVED] PopupMenu Sender
« on: November 24, 2020, 08:35:28 pm »
Hi All,

I have 3 Memo boxes on a form and 1 popup menu.

Each Memo is assigned the same PopupMenu.
 
How can I tell what Memo called the PopupMenu?

Thanks in advance.
« Last Edit: November 24, 2020, 09:18:52 pm by pcurtis »
Windows 10 / Linux Mint 20
Laz 2.10.0
FPC 3.2.0

ASerge

  • Hero Member
  • *****
  • Posts: 1736
Re: PopupMenu Sender
« Reply #1 on: November 24, 2020, 08:39:38 pm »
How can I tell what Memo called the PopupMenu?
PopupMenu.PopupComponent

pcurtis

  • Sr. Member
  • ****
  • Posts: 419
Re: PopupMenu Sender
« Reply #2 on: November 24, 2020, 08:42:55 pm »
Thanks
Windows 10 / Linux Mint 20
Laz 2.10.0
FPC 3.2.0

lucamar

  • Hero Member
  • *****
  • Posts: 3588
Re: PopupMenu Sender
« Reply #3 on: November 24, 2020, 08:44:35 pm »
Or use the memo's OnContextPopup to set a TMemo var storing which of them is the responsable.

Not as elegant as ASerge's solution, though :-[
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus/FPC 2.0.8/3.0.4 & 2.0.10/3.2.0 - 32/64 bits on:
(K|L|X)Ubuntu 12..18, Windows XP, 7, 10 and various DOSes.

 

TinyPortal © 2005-2018