Recent

Author Topic: Possible bug with anchors.  (Read 2868 times)

taazz

  • Hero Member
  • *****
  • Posts: 5368
Possible bug with anchors.
« on: November 25, 2015, 09:02:58 pm »
I need a confirmation on this, I'm using lazarus 1.4.4 (recently upgraded from 1.4.2) I'm having a weird behavior and trying to determine if it is me or its a generic problem. start a new project with a form add an Tedit or Tbutton change the anchors to akright, akbottom, does it change size and position? Are you able to resize it?
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

rvk

  • Hero Member
  • *****
  • Posts: 6163
Re: Possible bug with anchors.
« Reply #1 on: November 25, 2015, 10:28:17 pm »
I don't see any problem.

The only thing I noticed was that if I remove akTop for a TEdit, the height gets reset to default. I'm not sure if that was the case in 1.4.2.

O wait. That's due to the AutoSize being set to true.
« Last Edit: November 25, 2015, 10:33:15 pm by rvk »

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Possible bug with anchors.
« Reply #2 on: November 25, 2015, 10:35:08 pm »
sorry yes I have disabled left and top too on win7 the height of the control changes to something different that the default, every time that I try to resize it keeps get bigger although I try to make it smaller and the position does not stay fixed ee it jumps outside the form boundaries eg left becomes 1300+ and top becomes 2100+ but those numbers probably are resolution dependent or something.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

rvk

  • Hero Member
  • *****
  • Posts: 6163
Re: Possible bug with anchors.
« Reply #3 on: November 25, 2015, 10:45:14 pm »
You might want to reinstall then.
Here (fresh install) it works all as expected.
If [akBottom, akRight] the size stays the same when resizing the form (in design and run-time).
Only if combined with its opposite, the size is changed.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Possible bug with anchors.
« Reply #4 on: November 25, 2015, 11:35:07 pm »
You might want to reinstall then.
No! I'm not going to spend to much time on lcl its not worth it, in 6 months the new version will come out that will f**k up my current settings anyway.
Here (fresh install) it works all as expected.
If [akBottom, akRight] the size stays the same when resizing the form (in design and run-time).
Only if combined with its opposite, the size is changed.
Yeah it was too weird for me too so I tried it on a new project my self. The problem only manifests it self when the autoscroll of the form is set and the scroll bars are visible.
To see it drop an image on the form load a big image in it set the autosize of the TImage to true, the autoscroll of the form to true, drop a button on the form set its anchors to [akBottom, akRight] (make sure that akleft, aktop are not set, ee they have the value of false) and see how that works for you.

Thank you for your time I really appreciate it.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

rvk

  • Hero Member
  • *****
  • Posts: 6163
Re: Possible bug with anchors.
« Reply #5 on: November 26, 2015, 12:08:38 am »
Mmm, you don't even need to load an image. You can just place a TButton in the right below and make the form smaller. When AutoScroll is set weird things begin to happen. The TEdit seems to keep its size but the position is definitely off.

Each time when I add and remove an anker while the scroll-bar is visible, the position seems to shift down. Also when akBottom and akRight are selected, selecting the control and trying to move it, the drag-rectangle doesn't quite seem correct.

Yea... lots of bugs with the ankers when AutoScroll is set en the scrollbars are visible.


Edit: Same problems in trunk
« Last Edit: November 26, 2015, 12:12:42 am by rvk »

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: Possible bug with anchors.
« Reply #6 on: November 26, 2015, 12:17:55 am »
Thank you for the verification. I'm going to report a bug then and if I find some time I'll try to pin point the problem or build a solution. I still think that the layout mechanism should be moved outside the main hierarchy. As it is now I have to subclass all the controls (at lest the ones I'm using) just to disable all layout code. Oh goody even more work for me.

thank you for your help.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

 

TinyPortal © 2005-2018