Jump to content
Software FX Community

RE: Custom Menu/Event Trapping


Software FX

Recommended Posts

You cannot trap the Menu event because this event is only fired when the programmer creates its own menu as opposed to customizing the chart menus through the commands interface. You will have to trap the UserCommand. We added some code that will let you know the point/series the user clicked on (-1 if the click was on the chart background) but you will have to wait for service pack 4.5.18.0

This is the code that you will need

<script language="javascript">

<!--

function CHART_HIWORD(lValue) {

nHi = (lValue & 0xFFFF0000) / 0x10000;

return(nHi);

}

-->

</script>

<script language="javascript">

<!--

function CHART_LOWORD(lValue) {

return(lValue & 0x0000FFFF);

}

-->

</script>

<script language="javascript" for="Chart1" event="UserCommand(wParam, lParam, nRes)" >

<!--

lValue = Chart1.SendMsg(65,0,0);

nPoint = CHART_HIWORD(lValue);

nSer = CHART_LOWORD(lValue);

alert( "UserCommand ID = " + wParam + "\nnSeries = " + nSer + "\nnPoint = " + nPoint );

-->

</script>

Regards,

Juan Cegarra

Software FX, Inc.

support.softwarefx.com

-----Original Message-----

From: James Calder [mailto:jdcalder@e3corp.com]

Posted At: Wednesday, September 20, 2000 5:29 PM

Posted To: Client

Conversation: Custom Menu/Event Trapping

Subject: Custom Menu/Event Trapping

Hello,

I am using CFxIE and we are creating client-side custom menus. I need

to know how to trap an event so that it will give me the wParam, nSerie and

nPoint elements. I can use the UserCommand() but it doesn't give me the

nSerie or nPoint. I can use RButtonDown() but it doesn't give me the

wParam. It would seem that Menu() would give me all the needed elements but

I cannot get it to work for me.

Any help with the use of Menu() would be greatly appreciated!

- JD

// * * * This Works * * * //

<script language="javascript" for="Chart1" event="UserCommand(wParam,

lParam, nRes)">

alert("Inside the UserCommand Event");

alert( "wParam = " + wParam + "\nlParam = " + lParam + "\nnRes = " + nRes );

Chart1.ReturnValue = 1;

</script>

// * * * This Does Not Work * * * //

<script language="javascript" for="Chart1" event="Menu(wParam, nSerie,

nPoint, nRes)">

alert("Inside the Menu Event");

alert( "wParam = " + wParam + "\nnSerie = " + nSerie + "\nnPoint = " +

nPoint + "\nnRes = " + nRes );

Chart1.ReturnValue = 1;

</script>

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...