Expand my Community achievements bar.

Learn about Edge Delivery Services in upcoming GEM session

Get focus co-ordinates and set mouse position at that

Avatar

Level 7

Hi,

I am able to set focus on an object based on an event. But i want to perform following activities.

1). I want to read the (x,y) co-cordinates of the focused object.

2) Then I want to point my mouse to that co-ordinate.

Could anyone tell me how do I perform following two activities.

What I am Trying to accomplish.

mouseCoordinates.JPG


I want to move (up/down) following panels based on click event. When i Click on Move Up button, I am able to focus using (xfa.host.setFocus("MoveUp")) but my mouse pointer is still on the same position where I clicked on the button.

I want to move (x,y) position to focused button.

Regards

Sunil

6 Replies

Avatar

Level 9

Hi Sunil,

I am unable to understand what are you trying to achieve here. You are clicking on "MoveUp" button and to have focus on MoveUp button?  By defualt if you click the MoveUp button you will have focus on the same? Are you trying to focus on the field above by clicking MoveUp button. I am confused here. Could you please explain?

Thanks,

Bibhu.

Avatar

Level 7

Hi Bibhu,

Thanks for acknowleding my issue and sorry for my bad that I could not describe the issue correctly.

Let me try it once again

Actually in above screenshot, there are three panels( lets call them 1A, 1B and 1C). When i Click on "moveup" button on panel 1B. The 1B panel position got swaped with 1A panel ( i used instancemanger.moveInstance(?,?);) but my mouse pointer was on the same position to form (i.e x,y) not on the 1B panel. I want to stick position of my mouse pointer on the same button of same panel where i clicked (i.e on 'MoveUp' button of 1B panel where i clicked) which has been move on top of 1A panel).

I hope i could explain it properly now? Let me know.

Regards

Sunil

Avatar

Level 8

You can get the property of the mouse position but you can't set it.

Kyle

Avatar

Level 7

Kyle,

Could you let me know what is the way of getting mouse position?

May be we get answer or way of setting mouse position.

Regards

Sunil