B4J Question [ABMaterial] ScrollTo

micro

Well-Known Member
Licensed User
Longtime User
Hi
ScrollTo in a table It seems not to work
Example:
Code: Copy
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)
 
Upvote 0
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)
I had already tried, but not work the same
 
Upvote 0
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.
Ok work, my error.
I started the not correrct version of release version.
Thanks
 
Upvote 0
Back
Top