Although the InfoPath view is built on Internet Explorer technology, much of the features are disabled for security reasons. You will not be able to add a right-click menu the way you can to a Web page. You can however use the OnContextChange event to accomplish what you are looking for. That event handler would get the current node and text and store them in variables. Then you can have a button in the view or task pane which would present you with those.
Hope this helped!

Signature
Greg Collins [InfoPath MVP]
Please visit: http://www.InfoPathDev.com
I am trying to find out a way to add a Right click menu item(context
menu item) to the text box in infopath, which allows me to get the
selected text and the current node.
does anyone tried this? or anyone knows how to add a right click menu
to a infopath document.
thanks in advance,
The mallu
The mallu - 22 Sep 2004 19:42 GMT
Thanks for the response but I cannot find out the exact
selection/highlighted text, that the user has made within the text
box.
Frankly speaking, I want to get the selected/highlighted text from the
text box and copy to some other node. For eg:
Textbox.Text : "aa bb cc dd" and user highlighted "bb"
and If I had a menu with Copy as X, Copy as Y, Copy as Z
and if the user picks Copy as X option, I want to copy to X's node or
if the user picks copy as Y option, i want to copy to Y's node and so
on...
I was thinking of adding a toolbar instead of a right click menu or
drag and drop to a taskpane, where i have different boxes. ....some
other ways too.
As long as we accomplish this feature, I dont think the users care
how.
Thanks
the mallu
> Although the InfoPath view is built on Internet Explorer technology,
> much of the features are disabled for security reasons. You will not be
[quoted text clipped - 15 lines]
> thanks in advance,
> The mallu