B4J Question B4XTable ScrollOffset, ScrollBarChange Event...

Magma

Expert
Licensed User
Longtime User
Hi there...

here started.. a little project for resizing b4xtable but have some problems...

1) i can;t get scrolloffsetx... for example:

when trying to get it with this command:
B4X:
    Dim scrollx As double=B4XTable1.mBase.ScrollViewOffsetX
     Log(scrollx)
getting error:
Call B4XPages.GetManager.LogEvents = True to enable logging B4XPages events.
java.lang.RuntimeException: java.lang.ClassCastException: class anywheresoftware.b4j.objects.PaneWrapper$ConcretePaneWrapper$NonResizePane cannot be cast to class javafx.scene.control.ScrollPane (anywheresoftware.b4j.objects.PaneWrapper$ConcretePaneWrapper$NonResizePane is in unnamed module of loader 'app'; javafx.scene.control.ScrollPane is in module javafx.controls of loader 'app')
at anywheresoftware.b4a.keywords.Common$2$1.run(Common.java:1048)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:428)
at java.base/java.security.AccessController.doPrivileged(Native Method)
at javafx.graphics/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:427)
at javafx.graphics/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:96)
at javafx.graphics/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
at javafx.graphics/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:174)
at java.base/java.lang.Thread.run(Thread.java:834)
Caused by: java.lang.ClassCastException: class anywheresoftware.b4j.objects.PaneWrapper$ConcretePaneWrapper$NonResizePane cannot be cast to class javafx.scene.control.ScrollPane (anywheresoftware.b4j.objects.PaneWrapper$ConcretePaneWrapper$NonResizePane is in unnamed module of loader 'app'; javafx.scene.control.ScrollPane is in module javafx.controls of loader 'app')
at anywheresoftware.b4j.objects.ScrollPaneWrapper.getHPosition(ScrollPaneWrapper.java:114)
at anywheresoftware.b4a.objects.B4XViewWrapper.getScrollViewOffsetX(B4XViewWrapper.java:651)
at b4j.example.b4xmainpage$ResumableSub_enableresize.resume(b4xmainpage.java:412)
at anywheresoftware.b4a.keywords.Common$2$1.run(Common.java:1046)
... 7 more

2) Or I don;t know if exsits scrollbarchange event... is it possible to have it - someway ?

Thanks in advance
 

LucaMs

Expert
Licensed User
Longtime User
mBase is "always" the name of the base PANE(L) of a custom view.
You should get the CustomListView using GetView (I don't know which index, probably 0) from mBase. I'll tell you shortly.

EDIT: it is simply B4XTable1.clvData
 
Last edited:
Upvote 0
Top