angelone Member Licensed User Longtime User Apr 12, 2016 #1 Hi, i'am moving a image view by finger in this way B4X: Sub Activity_Touch (Action As Int, X As Float, Y As Float) selectpecs.Left = x-40.0 selectpecs.Top = y - 40.0 End Sub Is there a way to set Edges for the form?
Hi, i'am moving a image view by finger in this way B4X: Sub Activity_Touch (Action As Int, X As Float, Y As Float) selectpecs.Left = x-40.0 selectpecs.Top = y - 40.0 End Sub Is there a way to set Edges for the form?
DonManfred Expert Licensed User Longtime User Apr 12, 2016 #2 do checks for not exceed top = 0 (not go to minus) not exceed left = 0 (not go to minus) Upvote 0
angelone Member Licensed User Longtime User Apr 12, 2016 #3 I have do create an If statement like this? If selectpecs.Top = 0 Then selectpecs.Top = x + 40.0 End If If selectpecs.left = 0 Then selectpecs.left = x + 40.0 End If Upvote 0
I have do create an If statement like this? If selectpecs.Top = 0 Then selectpecs.Top = x + 40.0 End If If selectpecs.left = 0 Then selectpecs.left = x + 40.0 End If
Cableguy Expert Licensed User Longtime User Apr 12, 2016 #4 If x > 40 then Selectpecs.top = x if y > 40 then Selectpecs.Left = y Upvote 0