Recent

Author Topic: LAMW: PosRelativeToParent - rpRight  (Read 2032 times)

c4p

  • Full Member
  • ***
  • Posts: 158
LAMW: PosRelativeToParent - rpRight
« on: July 20, 2017, 07:55:58 am »
Not sure if this is a LAMW issue? but rpRight in PosRelativeToParent when set to True puts components (Button) hard right which is good but seems to set the top (y) coordinate to 0, it is in the top right hand corner of the form, loses the y coordinate? sets y/Top to 0?
Anyone know how to resolve this?
« Last Edit: July 20, 2017, 10:17:20 pm by c4p »
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

c4p

  • Full Member
  • ***
  • Posts: 158
Re: LAMW: PosRelativeToParent - rpRight
« Reply #1 on: July 20, 2017, 10:16:38 pm »
Anyone?  :(
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

SymbolicFrank

  • Hero Member
  • *****
  • Posts: 1313
Re: LAMW: PosRelativeToParent - rpRight
« Reply #2 on: July 20, 2017, 10:18:23 pm »
I have no idea what you are talking about.

c4p

  • Full Member
  • ***
  • Posts: 158
Re: LAMW: PosRelativeToParent - rpRight
« Reply #3 on: July 20, 2017, 11:44:38 pm »
That makes two of us.  :)

It is the alignment properties of a component so you can set it relative to the size of the form, instead of a fixed x/y it will always set the component to align right on the form etc. Every object on the LAMW form has these properties.

I got it working (I think!) by using the 'PosRelativeToAnchor' property and setting using 'raToRightOf' & raAlignBaseline' set to True. Obviously you need an anchor for this to work.
Lazarus 2.0.12 r64642/FPC 3.2.0 LAMW v0.8.6.4 on Windows 10+Linux Mint 21.2, projects mainly built using AppCompat and Gradle v8.5

 

TinyPortal © 2005-2018