I guess I'm just missing soemthing basic (no pun intended), but I don't
seem to be able to create a popup menu invoked on a right-click (aka
"context menu" - right?) while in a custom form.
This is a form used to enter some block text, and the users want the
ability to right-click->cut/paste instead of Ctrl-X,-C, or -V.
Can anybody point me to some canned code that does this?
Well, I looked at Steve Rindsberg's excellent FAQ
(
http://www.pptfaq.com/FAQ00768.htm) and found there a snippet that let
me cause a popup to appear. Using his followup snippet to print out
all the available IDs, I modified his code to pop up a small toolbar
with Cut, Copy, and Paste commands (IDs 21, 19, and 22). However, I
still have a number of problems:
1: The Copy and Cut buttons show in the popup disabled. I added code to
enable them explicitly (oCtrl.Enabled = True), but that appeared to
make no difference. It's as though it doesn't recognize that I've got
any text in my control selected, and yet it's clearly selected, because
it's highlighted. (BTW, HideSelection = True.)
2. If I click the Paste command, whatever's in the clipboard gets
pasted in the object that's *under* my form. I tried setting the focus
on my form (it was already there anyway, because I had selected some
text on it), but that made no difference.
3. After the abortive attempt to do the paste, the popped-up toolbar is
still visible, but it's moved some - what's up with that?
So I'm thinking: I clearly don't know what I'm doing as far what
programming to use in my event code. Does anyone have any tips that
would get me a little further down the path?