Not sure whether this is a bug or not.
I have a question concerning scrollbar.maximum and scrollbar.largechange. If you run the code below the maximum value you can get is actually 15 and not 20 (which is the value it is set at). If you set Largechange to 3 the maximum attainable is 17. It seems as if the maximum value attainable is actually scrollbar.maximum-scrollbar.largechange. Is this by design or a bug?
If I am correct I think it deserves to be mentioned in the help file anyway.
all the best / Björn
I have a question concerning scrollbar.maximum and scrollbar.largechange. If you run the code below the maximum value you can get is actually 15 and not 20 (which is the value it is set at). If you set Largechange to 3 the maximum attainable is 17. It seems as if the maximum value attainable is actually scrollbar.maximum-scrollbar.largechange. Is this by design or a bug?
If I am correct I think it deserves to be mentioned in the help file anyway.
all the best / Björn
B4X:
Sub Globals
'Declare the global variables here.
End Sub
Sub App_Start
Form1.Show
FillTable
scrollbar.New1("Form1",5,form1.Height-30,form1.Width-10,20,False)
scrollbar.Minimum=0
scrollbar.Maximum=table1.RowCount-1
scrollbar.SmallChange=1
scrollbar.LargeChange=5
End Sub
Sub FillTable
table1.AddCol(cString,"Col1",50)
For i=0 To 19
table1.AddRow(i)
Next
End Sub
Sub scrollbar_valuechanged
label1.Text=scrollbar.Value
End Sub