Size / Position overflow in SendMoveSizeMessages lazarus / 31-LCL ---------------------------------------------------------------------- lainz · 2018-05-09 14:50 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. ---------------------------------------------------------------------- Blaazen · 2018-05-09 15:42 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. ---------------------------------------------------------------------- lainz · 2018-05-09 15:49 So my panel can't be that big? ---------------------------------------------------------------------- Blaazen · 2018-05-09 15:56 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. ---------------------------------------------------------------------- lainz · 2018-05-09 15:59 Ok, well, seems that I need to redesign the containers, maybe using a TScrollBox instead. ---------------------------------------------------------------------- lainz · 2018-05-09 16:26 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 ). ---------------------------------------------------------------------- Blaazen · 2018-05-09 16:32 This seems to be limitation of button (or any control in general) rather than srollbox. ---------------------------------------------------------------------- lainz · 2018-05-09 16:36 Quote from: Blaazen on May 09, 2018, 06:32:15 pmThis 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.. ---------------------------------------------------------------------- HeavyUser · 2018-05-09 23:24 Quote from: lainz on May 09, 2018, 06:26:15 pmSo, 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