M
Michael C
I'm setting the AutoScrollPosition of a scrollable control. I was having
quite a bit of trouble with it not doing what I expected. Eventually I
worked out that if you want it to have a negative value you have to pass in
a positive value, eg
Point p = new Point(100,100);
Console.WriteLine(p.ToString());
this.AutoScrollPosition = p;
Console.WriteLine(this.AutoScrollPosition.ToString());
will output:
{X=100,Y=100}
{X=-100,Y=-100}
They document this in the help as being the way it is designed to work but
what I suspect is they found it was a bug so documented it into a feature.
Or is there another reason it would work this way?
Cheers,
Michael
quite a bit of trouble with it not doing what I expected. Eventually I
worked out that if you want it to have a negative value you have to pass in
a positive value, eg
Point p = new Point(100,100);
Console.WriteLine(p.ToString());
this.AutoScrollPosition = p;
Console.WriteLine(this.AutoScrollPosition.ToString());
will output:
{X=100,Y=100}
{X=-100,Y=-100}
They document this in the help as being the way it is designed to work but
what I suspect is they found it was a bug so documented it into a feature.
Or is there another reason it would work this way?
Cheers,
Michael