Lazarus
Programming => LCL => Topic started by: lainz on May 09, 2018, 04:50:32 pm
-
Hi, I get this error message sometimes, I have a lot of panels and labels, on this application:
https://github.com/Arandusoft/fpcpaymowidget
Each panel has AutoSize property, and these are shown / hidden and sized, depending on user interaction.
The attached screenshot is from yesterday I think.
Today I get this:
"position range in send move sizes message"
But I can't take screenshot, since app closed, so is what I remember, not the exact error.
-
Seems to some bug in autosizing routine. Those messages, like WMSize, have parameters Word, so anything >65535 is range overflow.
You need to debug it using Call Stack window.
-
So my panel can't be that big?
-
Just put panel on the form and try to set its height. I got: TWinControl.SetBounds (Panel1:TPanel): Height 65536 not allowed.
But Lazarus limits it more than just high(Word), max height I can set is 9999.
-
Ok, well, seems that I need to redesign the containers, maybe using a TScrollBox instead.
-
I put a single button on a TScrollBox and the max top position can be 32767, 1 more and I get the error of position range overflow. Regular form has also the same number.
So, what I need to do, is creating a virtual scroll, or using an already made one. Anyone knows about a virtual scroll component? ( I will try to google of course, but I ask if someone has already the knowledge here ).
-
This seems to be limitation of button (or any control in general) rather than srollbox.
-
This seems to be limitation of button (or any control in general) rather than srollbox.
Yes, I have no problem with that, If I can for example:
- Load only a panel at a time, and when user scrolls then load the other panel, but also remove the first one... then the max top property will never be reached.
The problem is that I also have a search tool that filters the controls, not the data..
-
So, what I need to do, is creating a virtual scroll, or using an already made one. Anyone knows about a virtual scroll component? ( I will try to google of course, but I ask if someone has already the knowledge here ).
I have my doubts that it will help but here is one for delphi http://www.simdesign.nl/virtualscrollbox.html