214 views
in GUI Development by

Hello there, we noticed strange behaviour in outline box. If outline box is scrolled down then dynamically added item is not placed into expected position. We made simple demo of this issue. You will see strange gaps after creating more than 10 elements. These gaps are dependent on outline scroll. Please, let us know how to use scrolling and adding new elements without gaps.

Thank you,

Jakub Jirgl

https://ask.embedded-wizard.de/?qa=blob&qa_blobid=13294884935946136790

1 Answer

0 votes
by
 
Best answer

Hello Jakub,

the behaviour is correct.

In your implementation you create rectangle views with vertical position incremented for each new view. At the same time you invoke EnsureVisible() method to scroll the already existing views. With the scrolling, the existing views are moved vertically - their Bounds value is adapted. The new views, however, ignore the already performed scrolling. They calculate a position as if there were no scrolling performed.

What can you do:

Add the actual scrolling in the calculated position of the just created view:

Best regards

Paul Banach

by
Thank you very much for the clarification.

Regards,

Jakub Jirgl

Embedded Wizard Website | Privacy Policy | Imprint

...