Hi Team,
I've got a problem with the width of the ScrollPager and I don't know how to fix it.
When I activate the ScrollPager the Chart is longer than my WinForm. But when I check the width within the Debugger it says that it is the same as before. Take a look at the pictures below.
Do you have a clue?
Thanks in advance!
ScrollPager too long
-
- Newbie
- Posts: 12
- Joined: Mon Apr 08, 2019 12:00 am
ScrollPager too long
- Attachments
-
- ScrollPager activated
- ScrollPager.png (27.43 KiB) Viewed 16777 times
-
- ScrollPager deactivated
- WithoutScrollPager.png (25.52 KiB) Viewed 16777 times
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: ScrollPager too long
Hello,
I've tried to recreate your project using the following code:
Using this code I obtain the following:
The only difference in Chart size I can appreciate here is that the Legend appears in the first Chart but doesn't appear when the ScrollPager is removed - this does affect the Chart width. Is this the issue you are referring to? If not, could you please modify my code above so I can reproduce your issue here?
I've tried to recreate your project using the following code:
Code: Select all
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
InitializeChart();
}
private void InitializeChart()
{
var line = new Line(tChart1.Chart);
line.FillSampleValues();
}
bool active = false;
ScrollPager _scrollPager = new ScrollPager();
private void ToolStripSplitButton1_ButtonClick(object sender, EventArgs e)
{
active = !active;
if(active)
{
tChart1.Tools.Add(_scrollPager);
_scrollPager.Series = tChart1[0];
}
else
{
tChart1.Tools.Remove(_scrollPager);
}
}
}
The only difference in Chart size I can appreciate here is that the Legend appears in the first Chart but doesn't appear when the ScrollPager is removed - this does affect the Chart width. Is this the issue you are referring to? If not, could you please modify my code above so I can reproduce your issue here?
Best Regards,
Christopher Ireland / 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 |
-
- Newbie
- Posts: 12
- Joined: Mon Apr 08, 2019 12:00 am
Re: ScrollPager too long
Hi Christopher,
thats right, the legend doesn't appear when the ScrollPager is removed. But this problem I already solved!
I just use TChart1.Legend.Visible = True when the ScrollPager is removed.
But that is not my problem now. There has to be an option that extend my TChart as soon as I activate the ScrollPager.
So I think I just have to check my Code and try to find the cause.
Thank you very much and if you got an idea, just let me now.
Best regards!
thats right, the legend doesn't appear when the ScrollPager is removed. But this problem I already solved!
I just use TChart1.Legend.Visible = True when the ScrollPager is removed.
But that is not my problem now. There has to be an option that extend my TChart as soon as I activate the ScrollPager.
So I think I just have to check my Code and try to find the cause.
Thank you very much and if you got an idea, just let me now.
Best regards!
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: ScrollPager too long
I'm afraid I'm still not entirely sure what your problem is - in the example I sent you above, can you see the problem occurring? If you can, could you please describe it to me - if you can't, could you please modify the example code so I can reproduce the problem here.LebbingUser wrote: ↑Mon Aug 12, 2019 7:02 amBut that is not my problem now. There has to be an option that extend my TChart as soon as I activate the ScrollPager.
So I think I just have to check my Code and try to find the cause.
Thank you very much and if you got an idea, just let me now.
Best Regards,
Christopher Ireland / 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 |
-
- Newbie
- Posts: 12
- Joined: Mon Apr 08, 2019 12:00 am
Re: ScrollPager too long
Hi Christopher,
sorry for the opaque description of my problem.
But I got good news, I solved the problem!
Somehow the chart width increased by activating the ScrollPager. So the TChart was wider than my WinForm.
Now I've reduced the chart width and everything seems to be okay.
Thank you very much for your help!
Best regards!
sorry for the opaque description of my problem.
But I got good news, I solved the problem!
Somehow the chart width increased by activating the ScrollPager. So the TChart was wider than my WinForm.
Now I've reduced the chart width and everything seems to be okay.
Thank you very much for your help!
Best regards!
-
- Guru
- Posts: 1603
- Joined: Fri Nov 15, 2002 12:00 am
Re: ScrollPager too long
That's excellent, I'm pleased to hear it!
If only helping other people was as simple as that
Best Regards,
Christopher Ireland / 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 |