It is possible to move items draging them in the chartlistbox. Is there any event to detect when it is done?
Thanks
ChartListBox event to detect if any item have been moved
Re: ChartListBox event to detect if any item have been moved
Hello acastor,
%Program Files%Steema Software\Steema TeeChart for .NET 2014 4.1.2014.08120\Examples\DemoProject\bin\ExecutableDemo
Moreover, you can use the simple example below that uses the DragDrop event to detect which item you have dragged.
Hoping it will help.
Thanks in advance,
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?
%Program Files%Steema Software\Steema TeeChart for .NET 2014 4.1.2014.08120\Examples\DemoProject\bin\ExecutableDemo
Moreover, you can use the simple example below that uses the DragDrop event to detect which item you have dragged.
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;
}
}
Thanks in advance,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |
Re: ChartListBox event to detect if any item have been moved
Thanks. But if I ask in the dragDrop event for the value of the list by example "lista.Items[0].ToString()" I see the item has not been moved yet. Is there any posterior event where the item is moved?
Thanks
Thanks
Re: ChartListBox event to detect if any item have been moved
Hello acastor,
In this case, I would like suggest you use the ChartListBox RefresEvent. That returns you the ChartListBox item value after it has been moved. The lines below shows how you can do it.
Hoping it will help.
Thanks in advance,
In this case, I would like suggest you use the ChartListBox RefresEvent. That returns you the ChartListBox item value after it has been moved. The lines below shows how you can do it.
Code: Select all
void listSeries_RefreshEvent(object sender, EventArgs e)
{
if (listSeries.Items.Count != 0)
{
this.Text = listSeries.Items[0].ToString();
}
}
Thanks in advance,
Best Regards,
Sandra Pazos / Development & Support Steema Software Avinguda Montilivi 33, 17003 Girona, Catalonia Tel: 34 972 218 797 http://www.steema.com |
Instructions - How to post in this forum |