ilan Expert Licensed User Longtime User Sep 7, 2012 #1 hi i have a panel and i want to scroll it to the left and to the right it should be very simple i tried to understand the sample project that i found here but i cant understand anything i just want a very simple code like panel1.down panel1.left = panel-x just to move it if i touch it thanx
hi i have a panel and i want to scroll it to the left and to the right it should be very simple i tried to understand the sample project that i found here but i cant understand anything i just want a very simple code like panel1.down panel1.left = panel-x just to move it if i touch it thanx
Informatix Expert Licensed User Longtime User Sep 7, 2012 #2 ilan12041981 said: hi i have a panel and i want to scroll it to the left and to the right it should be very simple i tried to understand the sample project that i found here but i cant understand anything i just want a very simple code like panel1.down panel1.left = panel-x just to move it if i touch it thanx Click to expand... The simplest code: Code: Copy ' Initialization Dim pnl As Panel pnl.Initialize("MyPanel") pnl.Color = Colors.Magenta Activity.AddView(pnl, 50dip, 50dip, 200dip, 200dip) Code: Copy ' Handler for the Touch event Sub MyPanel_Touch (Action As Int, X As Float, Y As Float) Dim pnl As Panel pnl = Sender If Action = 0 Then ' DOWN '... Else If Action = 2 Then ' MOVE pnl.Left = pnl.Left + X pnl.Top = pnl.Top + Y Else If Action = 1 Then ' UP '... End If End Sub Upvote 0
ilan12041981 said: hi i have a panel and i want to scroll it to the left and to the right it should be very simple i tried to understand the sample project that i found here but i cant understand anything i just want a very simple code like panel1.down panel1.left = panel-x just to move it if i touch it thanx Click to expand... The simplest code: Code: Copy ' Initialization Dim pnl As Panel pnl.Initialize("MyPanel") pnl.Color = Colors.Magenta Activity.AddView(pnl, 50dip, 50dip, 200dip, 200dip) Code: Copy ' Handler for the Touch event Sub MyPanel_Touch (Action As Int, X As Float, Y As Float) Dim pnl As Panel pnl = Sender If Action = 0 Then ' DOWN '... Else If Action = 2 Then ' MOVE pnl.Left = pnl.Left + X pnl.Top = pnl.Top + Y Else If Action = 1 Then ' UP '... End If End Sub