Recent

Author Topic: Size / Position overflow in SendMoveSizeMessages  (Read 1076 times)

lainz

  • Hero Member
  • *****
  • Posts: 2923
    • Home
Size / Position overflow in SendMoveSizeMessages
« 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.

Blaazen

  • Hero Member
  • *****
  • Posts: 2681
  • POKE 54296,15
    • Eye-Candy Controls
Re: Size / Position overflow in SendMoveSizeMessages
« Reply #1 on: May 09, 2018, 05:42:38 pm »
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.
Lazarus 2.1.0 r59757M FPC 3.3.1 r40507 x86_64-linux-qt Chakra, Qt 4.8.7/5.11.2, Plasma 5.14.2
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

lainz

  • Hero Member
  • *****
  • Posts: 2923
    • Home
Re: Size / Position overflow in SendMoveSizeMessages
« Reply #2 on: May 09, 2018, 05:49:03 pm »
So my panel can't be that big?

Blaazen

  • Hero Member
  • *****
  • Posts: 2681
  • POKE 54296,15
    • Eye-Candy Controls
Re: Size / Position overflow in SendMoveSizeMessages
« Reply #3 on: May 09, 2018, 05:56:22 pm »
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.
Lazarus 2.1.0 r59757M FPC 3.3.1 r40507 x86_64-linux-qt Chakra, Qt 4.8.7/5.11.2, Plasma 5.14.2
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

lainz

  • Hero Member
  • *****
  • Posts: 2923
    • Home
Re: Size / Position overflow in SendMoveSizeMessages
« Reply #4 on: May 09, 2018, 05:59:28 pm »
Ok, well, seems that I need to redesign the containers, maybe using a TScrollBox instead.

lainz

  • Hero Member
  • *****
  • Posts: 2923
    • Home
Re: Size / Position overflow in SendMoveSizeMessages
« Reply #5 on: May 09, 2018, 06:26:15 pm »
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

  • Hero Member
  • *****
  • Posts: 2681
  • POKE 54296,15
    • Eye-Candy Controls
Re: Size / Position overflow in SendMoveSizeMessages
« Reply #6 on: May 09, 2018, 06:32:15 pm »
This seems to be limitation of button (or any control in general) rather than srollbox.
Lazarus 2.1.0 r59757M FPC 3.3.1 r40507 x86_64-linux-qt Chakra, Qt 4.8.7/5.11.2, Plasma 5.14.2
Lazarus 1.8.2 r57369 FPC 3.0.4 i386-win32-win32/win64 Wine 3.21

Try Eye-Candy Controls: https://sourceforge.net/projects/eccontrols/files/

lainz

  • Hero Member
  • *****
  • Posts: 2923
    • Home
Re: Size / Position overflow in SendMoveSizeMessages
« Reply #7 on: May 09, 2018, 06:36:58 pm »
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..

HeavyUser

  • Full Member
  • ***
  • Posts: 219
Re: Size / Position overflow in SendMoveSizeMessages
« Reply #8 on: May 10, 2018, 01:24:48 am »
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