Drag and drop axes, having an issue
Posted: Wed Dec 12, 2007 9:58 pm
In the next version of our software, we would like to allow the user to drag and drop axis around. I am in the beginning stages of coding this feature, and I have already run in to an issue:
I can use Axis.Clicked(x, y) to see if a mouse click is inside the axis, but this only checks the tiny area where the ticks are. How do I get the rectangle that encompasses the entire axis area, including the labels and titles? I wonder the user to be able to drag from anywhere in that area, not just the ticks. AxisTitle has no Clicked method, and in fact it's Top, Left, Width and Height properties are always 0 (so I can't even created the rect for myself).
Is there a way to work around? Or a way to get the complete axis rect, including the titles and labels?
I can use Axis.Clicked(x, y) to see if a mouse click is inside the axis, but this only checks the tiny area where the ticks are. How do I get the rectangle that encompasses the entire axis area, including the labels and titles? I wonder the user to be able to drag from anywhere in that area, not just the ticks. AxisTitle has no Clicked method, and in fact it's Top, Left, Width and Height properties are always 0 (so I can't even created the rect for myself).
Is there a way to work around? Or a way to get the complete axis rect, including the titles and labels?