-
Notifications
You must be signed in to change notification settings - Fork 236
Rendering large or very tall TALRectangle #419
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Hi, I see the issue clearly. You need to understand that when you create a very tall TALRectangle, you're also creating a large off-screen buffer in memory. All Alcinoe controls use double buffering by default: they first render themselves into a bitmap buffer, and then that buffer is painted onto the screen during the paint cycle. This is a key reason Alcinoe is fast and smooth. But when you have more than ~20 users (each 80px height), your TALRectangle becomes around 1600px tall or more — and with over 100 users, it gets huge. On Windows this may work because the OS and GPU can handle large off-screen bitmaps more easily. On Android/iOS, however, the buffer allocation might fail silently — and when that happens, nothing is drawn, resulting in a black rectangle and missing corners. How to fix it? You have a few options: ✅ Option 1: Remove the rounded corners ✅ Option 2: Use Skia and disable double buffering
Skia is fast enough to draw directly onto the form without needing a buffer. This will keep your rounded corners and background color intact, without memory issues. Let me know which direction you want to explore, and I can help you further. |
Hello @Zeus64, thank you very much for your rapid response. Also, a feature I believe all Delphi developers would love very much to see is a TALRectangle (with rounded corners) being able to clip children around the corners when its ClipChildren property is set to True. I know this is a very challenging task, but it will come in very handy and help with a lot of designs when implemented. Great job. We really appreciate you. |
yes but this is very difficult to do :( |
by the way, if you want to create such big scrollable list of items, then you must take a look at the TALDynamicListBox. |
Certainly. |
@Elinulok32 just added it again, can you try now to download the app ? |
Uh oh!
There was an error while loading. Please reload this page.
I have a TALVertScrollBox that displays a list of about 100 users. For the design I want to implement, each user detail (in a layout) is rather added to a single TALRectangle instead of directly to the TALVertScrollBox and aligned TOP. The TALRectangle has a background color, rounded corners and AutoSize enabled:=True. The TALVertScrollBox then becomes the parent of the TALRectangle.
The issue is: Anytime the list of users exceeds 20 or so, the TALRectangle looses the color set to its Fill property and become all Black, and the rounded corners are also lost. This happens both on Android and iOS but not on Windows. The height of each user detail (layout) is 80, so having about 20 user makes the TALRectangle height to be 1600. At this height and beyond, the TALRectangle looses, its color and rounded corners.
Attached are 2 images the describe the issue. First one (with issue) has a list of more than 20 users and second one been filtered to display 7 users. How do I resolve this. Thank you.
The text was updated successfully, but these errors were encountered: