Scrollbars appearing unexpectedly
Posted: Wed Nov 28, 2007 1:41 am
I have a case where I am using a TeeChart control on a dialog. When the dialog first displays, it is NOT maximized. When I maximize the dialog, the chart resizes as I expected. But when I restore the size by clicking on the "Restore Down" button at the top right of the dialog, the chart resizes but has both a horizontal scrollbar and a verticle scrollbar. If I resize the dialog just slightly. The scrollbars disappear.
The chart is displaying a simple X-Y data.
The Anchor property is set to anchor on top, left, right, bottom.
I have set several chart properties to non-defaults. Here is a snippet of code that might have an effect on the scrollbars
// X axis
this.Axes.Bottom.Automatic = false;
this.Axes.Bottom.Minimum = sizes[0, 0];
this.Axes.Bottom.Maximum = sizes[0, 1];
this.Axes.Bottom.MinimumOffset = 1;
this.Axes.Bottom.MaximumOffset = 1;
// Y axis
this.Axes.Left.Automatic = false;
this.Axes.Left.Minimum = sizes[1, 0];
this.Axes.Left.Maximum = sizes[1, 1];
this.Axes.Left.MinimumOffset = 1;
this.Axes.Left.MaximumOffset = 1;
Is there a property I should be setting that will prevent the scrollbars from showing?
I do allow the user to pan the chart by using the Chart Controller and with a mouse click and drag move the charting surface around. I want to make sure this feature remains in effect.
The chart is displaying a simple X-Y data.
The Anchor property is set to anchor on top, left, right, bottom.
I have set several chart properties to non-defaults. Here is a snippet of code that might have an effect on the scrollbars
// X axis
this.Axes.Bottom.Automatic = false;
this.Axes.Bottom.Minimum = sizes[0, 0];
this.Axes.Bottom.Maximum = sizes[0, 1];
this.Axes.Bottom.MinimumOffset = 1;
this.Axes.Bottom.MaximumOffset = 1;
// Y axis
this.Axes.Left.Automatic = false;
this.Axes.Left.Minimum = sizes[1, 0];
this.Axes.Left.Maximum = sizes[1, 1];
this.Axes.Left.MinimumOffset = 1;
this.Axes.Left.MaximumOffset = 1;
Is there a property I should be setting that will prevent the scrollbars from showing?
I do allow the user to pan the chart by using the Chart Controller and with a mouse click and drag move the charting surface around. I want to make sure this feature remains in effect.