Steema Issues Database

Note: This database is for bugs and wishes only. For technical support help, if you are a customer please visit our online forums;
otherwise you can use StackOverflow.
Before using this bug-tracker we recommend a look at this document, Steema Bug Fixing Policy.



Bug 2260

Summary: TeeChart.WinForms (.NETCore 3) throws error when changing theme
Product: .NET TeeChart Reporter: christopher ireland <chris>
Component: ImportingAssignee: Steema Issue Manager <issuemanager>
Status: RESOLVED FIXED    
Severity: normal    
Priority: ---    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows   
URL: http://support.steema.com/viewtopic.php?f=4&t=17257
Chart Series: --- Delphi / C++ Builder RAD IDE Version:

Description christopher ireland 2019-10-31 07:44:50 EDT
The problem can be seen with the following code:

    public partial class Form1 : Form
    {
        TChart _tChart1;
        SplitContainer _splitContainer;
        Button _button;
        public Form1()
        {
            InitializeComponent();

            _splitContainer = new SplitContainer();
            _splitContainer.Dock = DockStyle.Fill;
            Controls.Add(_splitContainer);

            _tChart1 = new TChart();
            _tChart1.Dock = DockStyle.Fill;
            _tChart1.Series.Add(typeof(Bar)).FillSampleValues();
            _splitContainer.Panel2.Controls.Add(_tChart1);

            _button = new Button();
            _button.Text = "Click";
            _button.Click += _button_Click;
            _splitContainer.Panel1.Controls.Add(_button);

        }

        private void _button_Click(object sender, System.EventArgs e)
        {
            _tChart1.CurrentTheme = ThemeType.BlackIsBack;
        }
    }