Click an Touch Events

bees

Member
Licensed User
Longtime User
I have a panel with an Imageview, for the panel there is a touch event
and for the image a LongClick event.

oPanel.Initialize("Panels")
oImage.Initialize("Images")
oImage.Bitmap = oBitmap
oPanel.AddView(oImage, 0, 0, 50%x, 50%y)
Activity.AddView(oPanel,0,0,100%x,100%y)

Sub Images_LongClick()
DoSomething()
End Sub

Sub Panels_Touch()
DoSomethingElse()
End Sub

If there are no subs for handling clicks on the image, they are handeled by
the Sub Panels_Touch. I needed a long click on the image and to see if they are sliding on the image, now I control both in the Panels_Touch event.
I could not find how events are handeled so maybe there is a way
to get the Images_longclick event, and someone can point me out where
to look.
 

eps

Expert
Licensed User
Longtime User
I would suggest taking a look in the Designer and "Generate Members" if it's possible, then it should allow you to create it from there.. If not then it possibly isn't, but might be possible to do it another way... hth
 
Upvote 0

bees

Member
Licensed User
Longtime User
Take a look at this

Wish: Touch Event for ImageView

you can put a invisible panel over the image
to get the effect you want

I needed a Longclick and a Touch event on a Image.
As I understand the click events are ignored if there is a touch event.
I made it work by handling a longclick in the touch event.
Nice trick anyway for the invisible panel, I'm sure I have some use for it.
 
Upvote 0

ozgureffe

Member
Licensed User
Longtime User
I needed a Longclick and a Touch event on a Image.
As I understand the click events are ignored if there is a touch event.
I made it work by handling a longclick in the touch event.
Nice trick anyway for the invisible panel, I'm sure I have some use for it.
Hi bees,
And what was your solution? Adding a timer object and measure the positions to check if touch event stable as longclick?
I am at the point where you got stuck on before...
Thanks.
 
Upvote 0
Top