Inherit steema.teechart.styles.line

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
stollentroll83
Newbie
Newbie
Posts: 5
Joined: Thu Mar 17, 2005 5:00 am

Inherit steema.teechart.styles.line

Post by stollentroll83 » Mon Dec 05, 2005 9:52 am

i’m working with the TeeChart .Net Version and Visual Basic .NET.
I have a problem when I try to inherit from the styles.line object.

The tool shows the series correct, but when I start the built-in editor, there’s no graphic icon for the series and when I want to look up the properties for the series the application crashes.

Here’s my source code: (reduced to a minimum)

“””

Public Class Form1
Inherits System.Windows.Forms.Form

Public Sub New()
MyBase.New()
dim chart As New Steema.TeeChart.TChart
chart.Series.Add(New Line)
chart.Series(0).FillSampleValues(20)
End sub
End class

Public Class Line
Inherits Steema.TeeChart.Styles.Line

Public Sub New()
MyBase.new()
End Sub
End Class

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Dec 05, 2005 10:06 am

Hi,

It works fine for me here using the code below. Can you please test if this works for you?

Code: Select all

Public Class Form1
    Inherits System.Windows.Forms.Form

#Region " Windows Form Designer generated code "

    Public Sub New()
        MyBase.New()

        'This call is required by the Windows Form Designer.
        InitializeComponent()

        'Add any initialization after the InitializeComponent() call

    End Sub

    'Form overrides dispose to clean up the component list.
    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    'Required by the Windows Form Designer
    Private components As System.ComponentModel.IContainer

    'NOTE: The following procedure is required by the Windows Form Designer
    'It can be modified using the Windows Form Designer.  
    'Do not modify it using the code editor.
    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        '
        'Form1
        '
        Me.AutoScaleBaseSize = New System.Drawing.Size(5, 13)
        Me.ClientSize = New System.Drawing.Size(696, 533)
        Me.Name = "Form1"
        Me.Text = "Form1"

    End Sub

#End Region

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Dim chart As New Steema.TeeChart.TChart
        chart.Parent = Me
        chart.Series.Add(New Line)
        chart.Series(0).FillSampleValues(20)
    End Sub
End Class

Public Class Line
    Inherits Steema.TeeChart.Styles.Line

    Public Sub New()
        MyBase.new()
    End Sub
End Class
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

stollentroll83
Newbie
Newbie
Posts: 5
Joined: Thu Mar 17, 2005 5:00 am

Post by stollentroll83 » Mon Dec 05, 2005 10:25 am

Hi,

Thanks for your help.
I tested it, and work as well as my code.
I can see the series and the series points, but when i run the editor in run-time and try to click on the series tab, the application crashes.

the error description:
"""
Eine nicht behandelte Ausnahme des Typs 'System.IndexOutOfRangeException' ist in teechart.dll aufgetreten.

Zusätzliche Informationen: Der Index war außerhalb des Arraybereichs.
"""

stollentroll83
Newbie
Newbie
Posts: 5
Joined: Thu Mar 17, 2005 5:00 am

Post by stollentroll83 » Mon Dec 05, 2005 11:00 am

When i first change the style in the editor to line and then try to click on the series tab, everything is okay.

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Mon Dec 05, 2005 11:31 am

Hi,

Yes, this is because the editor dialogs are specific for each series type because each series type has different properties and methods. As you created a custom series type, editor dialogs for that series type doesn't exist and that's why you get that error.

To be able to edit your custom series via the chart editor you should customize so that it supports your custom series types. To customize the chart editor you should purchase TeeChart for .NET source code which is available as an option.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

stollentroll83
Newbie
Newbie
Posts: 5
Joined: Thu Mar 17, 2005 5:00 am

Post by stollentroll83 » Mon Dec 05, 2005 12:02 pm

Okay. Thanks for your help.

Post Reply