Right Click - getting data from the control

trentham

Registered User.
Local time
Today, 10:28
Joined
Mar 27, 2010
Messages
11
I have a form on which I've a number of text fields to which I've assigned a R-click menu. The R-click function I'm interested in invokes a function but how do I either pass to that function information about the control that was clicked or determine this information in some other way while in the function?

As a fictitious example, suppose my R-click menu contains:-
Cut
Copy
Paste
-------
Reverse
and suppose a form had two fields txtA and txtB each with this R-click menu. The command 'Reverse' is there to reverse the order of characters in that field and will invoke code to do it. How would my function find out which field to process?

Note. I assume it's obvious that I already know how to create the sub-menu.
 
Isn't it always the way?! Just as you've submitted a question that's been a problem for a while, you suddenly have another thought.....:o

In my case that's what's happened and I've thought about the screen object and found Screen.ActiveControl. :)
 
Haha! Great. I was just about to reply. Great job!

Welcome to AWF :)
 

Users who are viewing this thread

Back
Top Bottom