scrollRectToVisible Table component not behaving

7 बार देखा गया
नहीं पढ़े गए पहले मैसेज पर जाएं

shop.servic...@gmail.com

नहीं पढ़ी गई,
27 जन॰ 2019, 5:31:03 pm27/1/19
ईमेल पाने वाला CodenameOne Discussions
If you are experiencing an issue please mention the full platform your issue applies to:
IDE: NetBeans/Eclipse/IDEA NetBeans 8.2
Desktop OS Windows 10 Pro
Simulator Latest
Device PC, Android, IOS

Have a simple table that a Button Action Event calls the following code.

                                Rectangle rect = table.getSelectedRect();
                                table.scrollRectToVisible(rect.getX(), rect.getY(), rect.getWidth(), rect.getHeight(), this);

The Table contains 60+ rows.

Scroll Down and click to select row say 60
Then click the Button to force a scroll and the Page scrolls to the top where 1/2 the top page is blank

See attached pic

In general, I use scrollRectToVisible when the user adds a new row in a large list, we want to scroll to the bottom for example.

Regards.
CodenameoneScrollIssue-01-27-2019.JPG

Shai Almog

नहीं पढ़ी गई,
27 जन॰ 2019, 10:18:31 pm27/1/19
ईमेल पाने वाला CodenameOne Discussions
scrollRectToVisible would work if the rectangle was there. The main problem is that the table is rebuilt from scratch every time you use set model.
In this thread I explained the right solution to your problem: https://groups.google.com/d/msg/codenameone-discussions/bOTc1-QzE08/xazvNnz9FAAJ
सभी प्रषकों को उत्तर दें
लेखक को उत्तर दें
आगे भेजें
0 नया मैसेज