Quinn-Curtis Forums
Quinn-Curtis Forums
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Tools for Microsoft .Net & .Net Compact Framework
 QCChart2D and QCChart2D CF (VB and C#)
 Are multiple mouse listeners possible ?
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

pdean

4 Posts

Posted - 09 Jun 2004 :  00:08:43  Show Profile  Reply with Quote
I would like to configure my chart to do the following:
1. left mouse button as a tooltip
2. SHIFT+left button as a zoom facility

Is this possible ?

quinncurtis

1164 Posts

Posted - 09 Jun 2004 :  08:58:14  Show Profile  Reply with Quote
Only one mouse listener can be installed at a time.
Go to Top of Page

HorseloverFat

6 Posts

Posted - 06 Dec 2004 :  12:05:01  Show Profile  Reply with Quote
Although this answer is correct the respondent could have suggested some alternatives. I wanted to be able to utilise FindObj, ChartZoom and DataToolTip within a single chart. I achieved this by subclassing FindObj as MyFindObj and overriding the mouse event handlers. MyFindObj contains ChartZoom and DataToolTip instances. Based upon the object returned by GetSelectedObject() I then decided whether I needed to call my own dialog (for editing ChartText objects) or the required mouse events of the ChartZoom (if Shift key down) and DataToolTip instances. It seems to be working ok. Hope this is helpful to somone.
Go to Top of Page

PhoenixDaCat

14 Posts

Posted - 28 Feb 2005 :  08:28:07  Show Profile  Reply with Quote
What would be helpful would be an example HorseLoverFat
Go to Top of Page

OLI

4 Posts

Posted - 18 Jul 2005 :  05:42:39  Show Profile  Reply with Quote
Yes, really would apreciate a example. Olov
Go to Top of Page

quinncurtis

1164 Posts

Posted - 25 Nov 2005 :  12:23:48  Show Profile  Reply with Quote
We created a simple utility class, MultiMouseListener, that permits mutliple mouse listeners to be added to the same ChartView.

The MultiMouseListener class allows multiple MouseListener objects to be attached and processed by the chart. It does that by keeping an internal list of all MouseListener objects added to it. The MultiMouseListener is itself a MouseListener and can be attached to a ChartView. Inside it forwards every mouse message that it recieves to all MouseListener objects in its list. It is up to the programmer to make sure that the mouse event being trapped do not interfer with one another. An example program that includes the complete c# source of the MultiMouseListener can be downloaded here ->
http://quinn-curtis.com/examplecode/MultiMouseListenerDemo.zip

In use it works like:


DataToolTip datatooltip = new DataToolTip(chartVu);
datatooltip.SetDataToolTipFormat(ChartObj.DATA_TOOLTIP_XY_ONELINE);
datatooltip.SetButtonMask(MouseButtons.Left);
datatooltip.SetEnable(true);

ChartZoom zoomObj = new ChartZoom(chartVu, pTransform1, true);
zoomObj.SetButtonMask(MouseButtons.Right);
zoomObj.SetEnable(true);

MultiMouseListener multimouselistener = new MultiMouseListener(datatooltip);
multimouselistener.AddMouseListener(zoomObj);

chartVu.SetCurrentMouseListener(multimouselistener);



It does not handle the case of combined keyboard mouse input, since the mouse listeners do not process the keypresses in any way.

Go to Top of Page

new

14 Posts

Posted - 04 May 2006 :  04:57:35  Show Profile  Reply with Quote
Hello

As my question is related to multiple mouselistener i'm posting my question in this topic only..

I'm using two radio buttons, one for datatool tip & other for zooming
And problem is regarding the zooming

when i plot a graph and select zoom tool every thing works fine(i.e zoom and unzoom)..
but if i zoom in and then select datatooltip tool(mouselistner)
and again select back zoom tool i cannot unzoom from previous zoom state.

currently i'm redrwing comlete graph but it is not acceptable by user(client)
is there any method to overcome this problem?

Thanx
New

if yes pls tell me detailed method for it(i'm using VB2005 Express edition)


Go to Top of Page

quinncurtis

1164 Posts

Posted - 04 May 2006 :  09:11:33  Show Profile  Reply with Quote
Sorry, we don't know what your problem is.

We need to know the following:

1. Are you using the MultiMouseListener class described in this thread? Or are you installing a single mouse listener at a time in response to the radio button ?

2. Does all zooming not work when you re-select zooming, or is it just the un-zoom function.

3. Are you creating a new ChartZoom object when you select the zoom radio button, or are you just calling chartVu.SetCurrentMouseListener with the original zoom object that you created ?

If you are a commercial (i.e. paying) user of the software we can take a look at your program if you are unable to resolve the problem. Create the simpliest possible version of your program that reproduces the problem and send the complete source as a zipped project to suppor@quinn-curtis.com.



Go to Top of Page

new

14 Posts

Posted - 05 May 2006 :  05:51:05  Show Profile  Reply with Quote
Thanx for ur reply
ur Questions given me hint to solve my problem..
now its working..
By the way i'm commercial user of this software

thanx
NEW
Go to Top of Page

quinncurtis

1164 Posts

Posted - 05 May 2006 :  09:14:17  Show Profile  Reply with Quote
Rather than just say you solved your problem, you should state what the error was and what you did to resolve it.
Go to Top of Page

new

14 Posts

Posted - 08 May 2006 :  04:07:02  Show Profile  Reply with Quote
OKey
here is main modifications i done with my code

i was creating new mouse listner whenever zoom tool/datatool tip radio button got select..so now i'm creating only one zoom object & tooltip object when chart is getting plotted .


thankx
new
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
Quinn-Curtis Forums © 2000-07 Quinn-Curtis, Inc. Go To Top Of Page
Powered By: Snitz Forums 2000 Version 3.4.07