Hi All
New here. I'm not really a programmer but I self taught myself VB and used to do fairly well with it. I'm loving Basic4android.
I'm trying to move a panel using the touch event. It works fine for the most part but while dragging the panel it jitters and jumps all over the screen but ultimately ends up precisely where my finger lifts up. My code seems too simple so I must need something more. Here's the code. Thanks. Tony
Sub pnlGraph_Touch (Action As Int, X As Float, Y As Float)
Select Action
Case 0 'DOWN
Xtouch = X
Ytouch = Y
Case 2 'MOVE
pnlGraph.Left = pnlGraph.Left + X - Xtouch
pnlGraph.Top = pnlGraph.Top + Y - Ytouch
End Select
End Sub
New here. I'm not really a programmer but I self taught myself VB and used to do fairly well with it. I'm loving Basic4android.
I'm trying to move a panel using the touch event. It works fine for the most part but while dragging the panel it jitters and jumps all over the screen but ultimately ends up precisely where my finger lifts up. My code seems too simple so I must need something more. Here's the code. Thanks. Tony
Sub pnlGraph_Touch (Action As Int, X As Float, Y As Float)
Select Action
Case 0 'DOWN
Xtouch = X
Ytouch = Y
Case 2 'MOVE
pnlGraph.Left = pnlGraph.Left + X - Xtouch
pnlGraph.Top = pnlGraph.Top + Y - Ytouch
End Select
End Sub