Hi
ScrollTo in a table It seems not to work
Example:
B4X:
dim l as list = Array as String("a", "b", "c", "d", "e", "f", "g")
dim i as int
For i = 0 To l.Size - 1
'tlb3 is a ABMTable
tlb3.AddRow(i, Array As String(l.Get(i)))
Next
tlb3.ScrollTo(l.Size - 1, True)
This the error: "java.lang.NullPointerException
at com.ab.abmaterial.ABMTable.ScrollTo(Unknown Source)"
That's true. It does not work that way. In html you can scroll to a certain tag, so you have to use uniqueIDs for each row and then scroll to that ID (tags in html are strings, not starting with a number)
tbl1.AddRow("uid" & i, r)
And you have to refresh the table before you do a scroll (maybe even using a cellsubdelayed to the scroll?), as this works directly on the html in the browser so the html code must exist.
Then you can do something like this tbl1.ScrollTo("uid" & lastNumber, true)
Oh, and don't do ScrollTo() in BuildPage() as this is certainly impossible as the webpage is not even open in the browser. Do it in the WebSocket_Connected().
That's true. It does not work that way. In html you can scroll to a certain tag, so you have to use uniqueIDs for each row and then scroll to that ID (tags in html are strings, not starting with a number)
You will need to provide me with something more (e.g. some code) because just tried it in the demo app and it made no difference if it was in debug or release mode. Both worked. So you must be doing something different.
You will need to provide me with something more (e.g. some code) because just tried it in the demo app and it made no difference if it was in debug or release mode. Both worked. So you must be doing something different.