ChartListBox event to detect if any item have been moved
Posted: Tue Aug 19, 2014 10:13 am
It is possible to move items draging them in the chartlistbox. Is there any event to detect when it is done?
Thanks
Thanks
Steema Software - Customer Support Forums
http://216.92.101.67/support/
Yes, is possible. In the TeeChart.Net demo project there are some examples demonstrate that, specifically in Welcome !\Components\Chart listbox.. You find the demo project under similar path as next:It is possible to move items dragging them in the chartlistbox. Is there any event to detect when it is done?
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
Steema.TeeChart.ChartListBox listSeries;
private void InitializeChart()
{
listSeries = new Steema.TeeChart.ChartListBox();
this.Controls.Add(listSeries);
listSeries.Chart = tChart1;
tChart1.Aspect.View3D = false;
for (int i = 0; i < 4; i++)
{
new Steema.TeeChart.Styles.Line(tChart1.Chart);
tChart1[i].FillSampleValues();
}
listSeries.DragDrop += listSeries_DragDrop;
}
void listSeries_DragDrop(object sender, DragEventArgs e)
{
if(listSeries.EnableDragSeries)
{
this.Text= listSeries.Series(listSeries.SelectedIndex).Title;
}
}
Code: Select all
void listSeries_RefreshEvent(object sender, EventArgs e)
{
if (listSeries.Items.Count != 0)
{
this.Text = listSeries.Items[0].ToString();
}
}