1

Hi Friends, I have created one canvas form & on that i placed one image which is my button register. Now i am going to catch image touch events using pointerPressed method for only register image button. But how can i done this? can any one give me idea how to do this. How i can detect the user touches image of register using pointerPressed method. please help me friends. Thanks

Mr. Sajid Shaikh
  • 7,051
  • 4
  • 21
  • 35

2 Answers2

0

Working with CustomItem will provide your needs.

0

I have created one canvas form

Canvas or Form? these are totally different objects and handling pointer events would be totally different in Canvas vs Form.

given your mention of pointerPressed I suspect you're talking about Canvas right?

updated: For image drawn on Canvas (thanks for clarifying this btw), you need to know coordinates of the area it occupies, then you just need to check if x and y coordinates passed to in pointerPressed are within area occupied by your image (these are horizontal and vertical location where the pointer was pressed, relative to the Canvas - check the API docs)

gnat
  • 6,213
  • 108
  • 53
  • 73