vthomeschoolmom
14 years agoSuper Contributor
mouse vs cursor (focus?) current input position
Oh woe is the dreaded coordinates for clicking and right clicking. My dilemma is this. My application under test has a grid. The user has the ability to click on a row in the grid then right click there to bring up a pop up menu. I can get my cursor positioned on the correct row using the underlying properties of the grid. If send a right click with coordinates that match another row in the grid, I wind up with the wrong context for the context sensitive pop up menu. What I am doing is finding the lower right hand corner of the grid and right clicking there as there is generally no row there. This is not a highly desirable robust method.
I cannot use the MouseX or MouseY properties of the Desktop object because the mouse could be hovering anywhere on the screen unaffected by the grid's cursor/focus position change. (I am not even sure the correct term to use. I think cursor is right. If I am within a text box for instance, prepared to type, that is the position I would like to acquire. For example.)
Is this possible?
I cannot use the MouseX or MouseY properties of the Desktop object because the mouse could be hovering anywhere on the screen unaffected by the grid's cursor/focus position change. (I am not even sure the correct term to use. I think cursor is right. If I am within a text box for instance, prepared to type, that is the position I would like to acquire. For example.)
Is this possible?