Group: Forum Members
Last Active: 3 Years Ago
Posts: 8,
Visits: 40
|
Hi, that works like a charm! :-) I knew there was something obvious we'd missed, thanks a lot for your help.
|
Group: Forum Members
Last Active: Yesterday @ 1:54 AM
Posts: 3,054,
Visits: 4,009
|
Hi Jens, You can use the DefaultCursor property of the controller: nChartControl1.Controller.DefaultCursor = Cursors.AppStarting; Which allows you to specify the cursors when the mouse is over the control and there are no active interactivity tools. Hope this helps - let us know if you meet any problems.
Best Regards, Nevron Support Team
|
Group: Forum Members
Last Active: 3 Years Ago
Posts: 8,
Visits: 40
|
Hi, we're in the process of upgrading from the 2008 version to the 2014.1 version and we've run into some problems with the way mouse cursors are handled in the 2014.1 version. In the older version we simply created the Tools we needed and set the desired cursor for each tool. Then depending on user action we simply added or removed the currently active tool to get the desired mouse cursor to be shown. In our case we want the cursor to change when the user has pressed a custom button(e.g a zoom button). Once the cursor has been set we want the cursor to be shown regardless of what the mouse pointer is pointing to(Series,Wall,DataPoint etc). In the 2014.1 version the cursor needs to be set on each element in the graph by the following rather awkward action:
protected void SetupCursor() { System.Windows.Forms.Cursor cursor = new System.Windows.Forms.Cursor("ZoomIn.cur"); nChartControl1.InteractivityStyle.Cursor.Cursor = cursor; nChartControl1.Controller.Tools.Add(new NCursorTool()); foreach(NChartWall w in m_Chart.Walls) { w.InteractivityStyle.Cursor.Cursor = cursor; } foreach (NAxis a in m_Chart.Axes) { a.InteractivityStyle.Cursor.Cursor = cursor; } foreach (NSeries s in m_Chart.Series) { s.InteractivityStyle.Cursor.Cursor = cursor; } }
Since the cursor change is most likely a response to the mouse moving, iterating through potentially a large amount of series might be a bit of a performance hog. Have we missed any obvious way of setting a "global" cursor? Or is there any other way of achieving the functionality we used to have in the 2008 version?
|