How can I tell whether my mouse is over one of the scroll buttons in a win UltraGrid?
I am in the DragOver event, and e.X and e.Y is telling me where (on the entire screen) my mouse is.
How can I tell
1. First, whether the scrollbar is showing at all! (could be there are too few rows), and
2. Whether my mouse is over the up or the down button?
Yes thanks, it put me on the right track. I was trying to solve it in the same way as finding out which row the mouse is over; using Windows e.X and e.Y and trying to use GetContext.
In fact all I wanted was to be enable the user to scroll the UltraGrid if needed whilst in DragDrop mode. It's easier than I thought.
private void ultraGrid_DragOver(object sender, DragEventsArgs e){ UltraGrid myGrid = sender as UltraGrid; UIElement myElement = =myGrid.DisplayLayout.UIElement.ElementFromPoint(myGrid.PointToClient(new Point(e.X, e.Y))); if (myElement is ScrollArrowUIElement) { ScrollArrowUIElement arrow = myElement as ScrollArrowUIElement; arrow.PerformClick(); }}
Hello,
Could you please review the sample attached to this post and see if it meets your requirements.Please feel free to let me know if I misunderstood you or if you have any other questions.