I am working with a derived class based on GoToolCreating and a swimlane like project that determines the lane and lane height to completely (in the Y dimension) fill the lane. I have set minimum size so it fills the lane (ie. it is the lane height). And this is working great!
However when I move the mouse above the lane I have selected the selection rect “flops” over to the higher lane. And I need to constrain the selection rect to the original lane.
I have tried ComputeBox, however that does not seem to be real time.
I think I figured it out. You don’t do this with the Tool, it is in the IGoSnapDragger!
Overriding GoToolCreating.ComputeBox is the right thing to do. I believe it should also be sufficient for your purposes. It’s the only method that looks at the value of .LastInput.DocPoint, and it’s called repeatedly as the user is dragging the mouse.
ComputeBox is also the only code that looks at the value of GoToolCreating.SnapsToGrid. If your code is considering any swim lane, you are implementing your own “snapping” and don’t need to depend on the SnapsToGrid property.