beforecontextmenu spreadsheet owc10

C

cui

Hello

I try in javascript to modify the context menu of a spreadsheet. I use the
OWC10.
For this, it is an example of my code. In the HTML page:
<style>.Heading { font-family:Arial;font-size:14pt;}
<!--.extendSpreadSheet {behavior:url(ExtendSpreadSheet.htc);}
-->
</style>

....
<object class="extendSpreadSheet" classid="....">

In the javascript file (extendSpreadSheet.htc)


<public:component>
function init() {
esp = new ExtSpreadSheet() ;
}


function ExtSpreadSheet() {
if (element != null) { sp = element ; }
this.UserInterface = new ExtSpreadSheetUI(sp, this) ;
}
function ExtSpreadSheetUI(espIn, espObjIN) {
espIn.attachEvent("DblClick", espDoubleClick) ;
espIn.attachEvent("BeforeContextMenu", espBeforeContextMenu) ;

function espDoubleClick() { alert("dbl click ok") ; }
function espBeforeContextMenu(x,y, Menu, Cancel) {
alert("espBeforeContextMenu ok") ; }
}

Then, the doubleclick function runs correctly when I dbl click on a cell.
But, the espBeforeContextMenu function doesn't run with the right click. I
have always the default context menu. Moreover, with the pivottable
compounent, the beforecontextmenu handler is retrieved like this (shown in a
Microsoft example about the drillthrought function).

My question: the beforecontextmenu handler runs with the Spreadsheet
compounent, and how? How can I get the context menu? Do I make a mistake ?
Do I forget something ?

Thanks for your help !

Cui
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top