Profile Picture

Setting the NChartControl.Cursor property appears to have no effect

Posted By Lance Levendowski 8 Years Ago

Setting the NChartControl.Cursor property appears to have no effect

Author
Message
Lance Levendowski
Posted 8 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: 6 Months Ago
Posts: 60, Visits: 157
Setting the NChartControl.Cursor property appears to have no effect when the mouse is moved over the control during runtime.

Run the following sample code to reproduce the issue.  Note that the NChartControl should use the Hand cursor, but it always uses the Default cursor.

Public Class CursorForm
  Inherits Windows.Forms.Form

  Private _ChartControl1 As Nevron.Chart.WinForm.NChartControl

  Public Sub New()
    MyBase.New()

    Me.Size = New Drawing.Size(640, 480)
    Me.StartPosition = FormStartPosition.CenterScreen

    Dim series As New Nevron.Chart.NBarSeries
    series.BarShape = Nevron.Chart.BarShape.Bar
    series.AddDataPoint(New Nevron.Chart.NDataPoint(3))
    series.AddDataPoint(New Nevron.Chart.NDataPoint(1))
    series.AddDataPoint(New Nevron.Chart.NDataPoint(2))
    series.AddDataPoint(New Nevron.Chart.NDataPoint(5))
    series.AddDataPoint(New Nevron.Chart.NDataPoint(4))

    Me._ChartControl1 = New Nevron.Chart.WinForm.NChartControl
    Me._ChartControl1.Dock = DockStyle.Fill
    Me._ChartControl1.Settings.RenderSurface = Nevron.GraphicsCore.RenderSurface.Window
    '
    'ISSUE: Setting the NChartControl.Cursor property appears to have no effect when the mouse is moved over the control during runtime.
    Me._ChartControl1.Cursor = Cursors.Hand
    '
    Me.Controls.Add(Me._ChartControl1)

    Dim chart As Nevron.Chart.NCartesianChart = DirectCast(Me._ChartControl1.Charts(0), Nevron.Chart.NCartesianChart)
    chart.Series.Add(series)
  End Sub

End Class



Nevron Support
Posted 8 Years Ago
View Quick Profile
Supreme Being

Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)Supreme Being (4,435 reputation)

Group: Forum Members
Last Active: Yesterday @ 1:54 AM
Posts: 3,054, Visits: 4,009
Hi Lance,

The Cursor property is not regarded as the control also needs to operate under WPF. The following code shows how to change the default cursor:

INMouseService mouseService = (INMouseService)nChartControl1.View.GetServiceOfType(typeof(INMouseService));           mouseService.DefaultCursor = Cursors.Cross;


Best Regards,
Nevron Support Team



Lance Levendowski
Posted 8 Years Ago
View Quick Profile
Forum Newbie

Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)Forum Newbie (0 reputation)

Group: Forum Members
Last Active: 6 Months Ago
Posts: 60, Visits: 157
Works perfect.  Thanks!




Similar Topics


Reading This Topic