After add scrollpager the chart dock property doesn't run
After add scrollpager the chart dock property doesn't run
I have a example
http://193.145.251.126/pnp/files/KwANvF ... echart.zip
If you run the project and maximize the window, the chart is also maximized. But if you push the button2 (for seeing the scroll pager) and then you maximize the window, the chart is not maximized.
Is that behaviour correct?
http://193.145.251.126/pnp/files/KwANvF ... echart.zip
If you run the project and maximize the window, the chart is also maximized. But if you push the button2 (for seeing the scroll pager) and then you maximize the window, the chart is not maximized.
Is that behaviour correct?
Re: After add scrollpager the chart dock property doesn't run
Hello wakeup,
Thanks for your information. I have added the problem in bug list report with number [ID72 ]. We will try to fix it to upcoming versions of TeeChartFor.Net. To following the progress of your bug, I recommend you taking a look in the bug tracker .
Thanks,
Thanks for your information. I have added the problem in bug list report with number [ID72 ]. We will try to fix it to upcoming versions of TeeChartFor.Net. To following the progress of your bug, I recommend you taking a look in the bug tracker .
Thanks,
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: After add scrollpager the chart dock property doesn't run
I have installed the new version of teechart but I see it is not solved yet. What happened?
Thanks
Thanks
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: After add scrollpager the chart dock property doesn't run
Hi wakeup,
As Christopher Ireland commented here, you need to use TChart's Resize event as shown in the bugzilla ticket.
As Christopher Ireland commented here, you need to use TChart's Resize event as shown in the bugzilla ticket.
Best Regards,
Narcís Calvet / 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: After add scrollpager the chart dock property doesn't run
Ok, now it is resized when the is a scrollpager, but if I remove the ScrollPager the chart doesn't resize...
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: After add scrollpager the chart dock property doesn't run
Hello,
You can either unsubscribe the event when the tool is removed:
or check that the tool exists in the event implementation:
You can either unsubscribe the event when the tool is removed:
Code: Select all
tChart1.Tools.Remove(scrollPager1);
tChart1.Resize -= tChart1_Resize;
Code: Select all
void tChart1_Resize(object sender, EventArgs e)
{
if (tool != null)
{
tool.Series = num;
}
}
Best Regards,
Narcís Calvet / 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: After add scrollpager the chart dock property doesn't run
I tried it but it still does doesn't resice. In fact the chart doesn't go to his place, there is still below the chart the space ocuped previously by the pagescroller...
- Attachments
-
- pagescrollerdeleted.png (19.76 KiB) Viewed 16494 times
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: After add scrollpager the chart dock property doesn't run
Hello wakeup,
Using the code below works fine for me. Click the chart to remove the ScrollPager tool. Does this code work fine for you?
Thanks in advance.
Using the code below works fine for me. Click the chart to remove the ScrollPager tool. Does this code work fine for you?
Code: Select all
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
InitializeChart();
}
Steema.TeeChart.Styles.Line num;
ScrollPager tool;
private void InitializeChart()
{
num = new Steema.TeeChart.Styles.Line();
tChart1.Series.Add(num);
num.FillSampleValues();
tool = new ScrollPager(tChart1.Chart);
tool.Series = num;
tChart1.Dock = DockStyle.Fill;
tChart1.Click +=tChart1_Click;
tChart1.Resize += tChart1_Resize;
}
void tChart1_Click(object sender, EventArgs e)
{
tChart1.Tools.Remove(tool);
}
void tChart1_Resize(object sender, EventArgs e)
{
if (tool != null)
{
tool.Series = num;
}
}
}
Best Regards,
Narcís Calvet / 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: After add scrollpager the chart dock property doesn't run
It runs for me too, but I I put the " tChart1.Tools.Remove(tool);" in the event of a button and not in the _click event it doesn't run
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: After add scrollpager the chart dock property doesn't run
Hi wakeup,
Code below works fine for me here. Can you please attach a simple example project we can run "as-is" and let us know the exact steps we should follow to reproduce the problem here?
Thanks in advance.
Code below works fine for me here. Can you please attach a simple example project we can run "as-is" and let us know the exact steps we should follow to reproduce the problem here?
Code: Select all
public Form1()
{
InitializeComponent();
InitializeChart();
}
Steema.TeeChart.Styles.Line num;
ScrollPager tool;
private void InitializeChart()
{
button1.Dock = DockStyle.Bottom;
num = new Steema.TeeChart.Styles.Line();
tChart1.Series.Add(num);
num.FillSampleValues();
tool = new ScrollPager(tChart1.Chart);
tool.Series = num;
tChart1.Dock = DockStyle.Fill;
tChart1.Resize += tChart1_Resize;
}
void tChart1_Resize(object sender, EventArgs e)
{
if (tool != null)
{
tool.Series = num;
}
}
private void button1_Click(object sender, EventArgs e)
{
tChart1.Tools.Remove(tool);
}
Best Regards,
Narcís Calvet / 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: After add scrollpager the chart dock property doesn't run
Hi
http://193.145.251.126/pnp/files/DYjQEI ... Scroll.zip
Try this example, press button1 and then button2
http://193.145.251.126/pnp/files/DYjQEI ... Scroll.zip
Try this example, press button1 and then button2
-
- Site Admin
- Posts: 14730
- Joined: Mon Jun 09, 2003 4:00 am
- Location: Banyoles, Catalonia
- Contact:
Re: After add scrollpager the chart dock property doesn't run
Hi wakeup,
Thanks for the project. You have 2 options for this to work:
1. Dispose the tool after you remove it:
2. Use Remove instead of RemoveAt:
Thanks for the project. You have 2 options for this to work:
1. Dispose the tool after you remove it:
Code: Select all
tChart1.Tools.RemoveAt(0);
tool.Dispose();
Code: Select all
tChart1.Tools.Remove(tool);
Best Regards,
Narcís Calvet / 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: After add scrollpager the chart dock property doesn't run
Now it runs. Thanks a lot!