Hi there,
I would like to ask for advise on this one, from http://www.b4x.com/forum/basic4andr...9-editable-moveable-text-panel.html#post78873 I took the code:
Sub pnlTest_Touch (Action As Int, X As Float, Y As Float)
X = X-(lblPanelTitle.Width/2)
Y = Y-(lblPanelTitle.Height/2)
If x >= 0 AND x <= pnlTest.Width-lblPanelTitle.Width Then
lblPanelTitle.Left = X
End If
If y >= 0 AND y <= pnlTest.Height-lblPanelTitle.Height Then
lblPanelTitle.Top = Y
End If
End Sub
and it works except it doesn't work as I expect, it seems to work more like a click event..I have to lift my finger each time to make it follow my finger, is there code that can just make a panel follow my finger around as I move the finger around the screen?
X As Float, Y As Float, are those the X,Y coordinates where the finger pressed within the panel?
Any ideas why this might be happening or how to do this?
Thanks
I would like to ask for advise on this one, from http://www.b4x.com/forum/basic4andr...9-editable-moveable-text-panel.html#post78873 I took the code:
Sub pnlTest_Touch (Action As Int, X As Float, Y As Float)
X = X-(lblPanelTitle.Width/2)
Y = Y-(lblPanelTitle.Height/2)
If x >= 0 AND x <= pnlTest.Width-lblPanelTitle.Width Then
lblPanelTitle.Left = X
End If
If y >= 0 AND y <= pnlTest.Height-lblPanelTitle.Height Then
lblPanelTitle.Top = Y
End If
End Sub
and it works except it doesn't work as I expect, it seems to work more like a click event..I have to lift my finger each time to make it follow my finger, is there code that can just make a panel follow my finger around as I move the finger around the screen?
X As Float, Y As Float, are those the X,Y coordinates where the finger pressed within the panel?
Any ideas why this might be happening or how to do this?
Thanks