Re: Is this a bug?
- From: "Kevin Spencer" <kevin@xxxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 7 Apr 2006 08:54:36 -0400
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?
I would work this way because that is how it was designed to work. You're a
programmer, right? So, you create the business rules in your code, right?
So, if you say that a property which is positive results in a result that
appears negative, that is the way it works. In this case, the result is a
distance, although it could be either horizontal or vertical, up, down,
right or left. A distance is never negative. Let's say that you and I are
standing 3 feet apart, and you are to my north. How far apart are we? (Hint:
3 feet)Now, you move to a position 3 feet to my south. How far apart are we?
(Hint: 3 feet) But are you still in the same postion relative to the North
Pole? (Hint: No) Is your distance from me, or your distance from the North
Pole, a negative number? (Hint: No)
--
HTH,
Kevin Spencer
Microsoft MVP
Professional Numbskull
Show me your certification without works,
and I'll show my certification
*by* my works.
"Michael C" <nospam@xxxxxxxxxx> wrote in message
news:OHT8vAiWGHA.924@xxxxxxxxxxxxxxxxxxxxxxx
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
.
- Follow-Ups:
- Re: Is this a bug?
- From: Michael C
- Re: Is this a bug?
- References:
- Is this a bug?
- From: Michael C
- Is this a bug?
- Prev by Date: Adding Property to my DataGridViewColumn
- Next by Date: how to design shopping site
- Previous by thread: Is this a bug?
- Next by thread: Re: Is this a bug?
- Index(es):
Relevant Pages
|