ScrollPager too long

TeeChart for Microsoft Visual Studio .NET, Xamarin Studio (Android, iOS & Forms) & Monodevelop.
Post Reply
LebbingUser
Newbie
Newbie
Posts: 12
Joined: Mon Apr 08, 2019 12:00 am

ScrollPager too long

Post by LebbingUser » Thu Aug 08, 2019 2:28 pm

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!
Attachments
ScrollPager.png
ScrollPager activated
ScrollPager.png (27.43 KiB) Viewed 16956 times
WithoutScrollPager.png
ScrollPager deactivated
WithoutScrollPager.png (25.52 KiB) Viewed 16956 times

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: ScrollPager too long

Post by Christopher » Thu Aug 08, 2019 3:23 pm

Hello,

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);
            }
        }
    }
Using this code I obtain the following:

Image

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

LebbingUser
Newbie
Newbie
Posts: 12
Joined: Mon Apr 08, 2019 12:00 am

Re: ScrollPager too long

Post by LebbingUser » Mon Aug 12, 2019 7:02 am

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!

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: ScrollPager too long

Post by Christopher » Mon Aug 12, 2019 8:12 am

LebbingUser wrote:
Mon Aug 12, 2019 7:02 am
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.
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.
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

LebbingUser
Newbie
Newbie
Posts: 12
Joined: Mon Apr 08, 2019 12:00 am

Re: ScrollPager too long

Post by LebbingUser » Mon Aug 12, 2019 1:06 pm

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!

Christopher
Guru
Posts: 1603
Joined: Fri Nov 15, 2002 12:00 am

Re: ScrollPager too long

Post by Christopher » Tue Aug 13, 2019 6:40 am

LebbingUser wrote:
Mon Aug 12, 2019 1:06 pm
But I got good news, I solved the problem!
That's excellent, I'm pleased to hear it!
LebbingUser wrote:
Mon Aug 12, 2019 1:06 pm
Thank you very much for your help!
If only helping other people was as simple as that :D
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

Post Reply