I need a small tutorial about scroolling in form.
I have a bunch of image buttons or buttons.
For example the form as space for only 10 Image Buttons and i want to use 15 image buttons , so i need to scroll along the form, like we do in android. it is possible on device?
Sub Globals
'Declare the global variables here.
dim buttons(0)
dim startx,starty
End Sub
Sub App_Start
Form1.Show
End Sub
Sub Form1_MouseDown (x,y)
startx=x
starty=y
End Sub
Sub Form1_MouseUp (x,y)
buttons() = GetControls("Form1")
For i = 0 To ArrayLen(buttons())-1
'Control(buttons(i)).left=x
Control(buttons(i)).top=Control(buttons(i)).top+y-starty
next
End Sub
for smooth scrolling you have insert some steps.
stefan
I haven't tried any of this, but won't there be a problem that the "mouse" touch has to be between the buttons so that the button itself does not get the mouse action. This means big gaps between the buttons, which will make use of the screen "real estate" even worse.
But then I don't have an Android to compare either...
I'm afraid that you can't do it in B4PPC, exactly like in Android.
I would suggest you to put all the Controls onto a Panel, add a ScrollBar from the FormLib library which will aloow you to scroll the Panel on the form.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.