Re: Popup Menu's Parent/Owner Component
- From: "Maarten Wiltink" <maarten@xxxxxxxxxxxxxxxxxx>
- Date: Wed, 24 Oct 2007 10:01:55 +0200
<simonkolomyjec@xxxxxxxxx> wrote in message
news:1193201561.741450.52840@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I have a app that dynamically creates a page in a pagecontrol with a
memo and assigns a popupmenu to each memo. This popup menu has a
print, export and close page item.
I can close the page fine by closing the active page in the page
control, however i cannot print or save the memo contents because i
can not get access to the popup menu's owner (i.e. the memo) when the
popup menu is clicked.
I have tried:
(Sender as TMemo)
(Sender as TpopupMenu).Owner as TMemo)
(Sender as Tpopupmenu).Parent as TMemo)
You're obviously fishing as to what Sender is anyway. Set a breakpoint
and put a watch on Sender.ClassName.
Then, when you're back from debugging, type 'PopupComponent', press F1,
read help. (You could have found this by reading the property list for
TPopupMenu - just as I did, a minute ago.)
Groetjes,
Maarten Wiltink
.
- References:
- Popup Menu's Parent/Owner Component
- From: simonkolomyjec
- Popup Menu's Parent/Owner Component
- Prev by Date: Re: How to time the execution of a method?
- Next by Date: table does not exist
- Previous by thread: Popup Menu's Parent/Owner Component
- Next by thread: table does not exist
- Index(es):
Relevant Pages
|