Code: Select all
//#define ADD_SCROLL_PAGER
using Steema.TeeChart;
using Steema.TeeChart.Styles;
using Steema.TeeChart.Tools;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows.Forms;
namespace ScrollPagerTest
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
InitializeChart();
}
#if (ADD_SCROLL_PAGER)
ScrollPager tool;
#endif
Steema.TeeChart.Styles.Line series;
private void InitializeChart()
{
tChart1.Dock = DockStyle.Fill;
tChart1.Header.Text = "Scroll Pager Tool";
tChart1.Series.Add(series = new Steema.TeeChart.Styles.Line());
series.FillSampleValues(1000);
series.Legend.Visible = false;
#if (ADD_SCROLL_PAGER)
tChart1.Tools.Add(tool = new ScrollPager());
tool.Series = series;
tool.SubChartTChart.Panel.Pen.Visible = false;
tool.SubChartTChart.Panel.Bevel.Inner = Steema.TeeChart.Drawing.BevelStyles.None;
tool.SubChartTChart.Panel.Bevel.Outer = Steema.TeeChart.Drawing.BevelStyles.None;
#endif
}
}
}
Then uncomment the:
Code: Select all
#define ADD_SCROLL_PAGER
With the ScrollPager tool added to the chart the chart no longer seems to be docked and the form is not able to be resized effectively.
I attached a SizeChanged event to the chart and the chart is getting events but the ScrollPager does not seem to be getting anything.
I tried docking the chartSettings.ScrollPagerTool.SubChartTChart but that does not seem to do anything either.
Any idea how to allow for resizing when a ScrollPagerTool is added to the chart?