Recent

Author Topic: [SOLVED] LAMW : issue with jPanel alignment  (Read 2608 times)

tintinux

  • Sr. Member
  • ****
  • Posts: 311
    • Gestinux
[SOLVED] LAMW : issue with jPanel alignment
« on: September 07, 2016, 08:40:04 am »
Hi

1) Create a new LAMW GUI project. AndroidModule1.Height is by default defined to 400 and Width=320, Margins=0
1) Put a jPanel (jPanel1) onto AndroidModule1.
2) Set PosRelativeToParent to [rpTop,rpLeft,rpRight]
3) Set LayoutParamWidth to lpMatchParent  (BTW, it could be a done automatically with both rpLeft and rpRight)
4) Set LayoutParamHeight to lpFiveSixthOfParent 

Result : jPanel1.Height is changed to 15789312  and the bottom of the panel is obviously not visible.

I expected the Height to be set to 400*5/6 = 333 and the bottom visible, with room below for another control 1/6 of module height  ...

It is the same result with any lp(N-1)Of(N)OfParent

Is there something I don't understand correctly, or is there some bug ?

Thanks

« Last Edit: September 09, 2016, 03:00:27 pm by tintinux »
Initiator of gestinux, open-source, multi-database and multilingual accounting and billing software made with LAZARUS.

You can help to develop, to make and improve translations, and to provide examples of legal charts and reports from more countries.

jmpessoa

  • Hero Member
  • *****
  • Posts: 1623
Re: LAMW : issue with jPanel alignment
« Reply #1 on: September 07, 2016, 03:36:16 pm »

Please, try

PosRelativeToParent = [rpTop]

or

PosRelativeToParent = [rpTop, rpLeft]

or

PosRelativeToParent = [rpTop, rpRight]

Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

A.S.

  • Jr. Member
  • **
  • Posts: 76
Re: LAMW : issue with jPanel alignment
« Reply #2 on: September 08, 2016, 09:58:29 pm »
By some reason, lpFiveSixthOfParent was not handled in GetLayoutParamsByParent2.

Also missing:
  lpThreeEighthOfParent
  lpFiveEighthOfParent
  lpSevenEighthOfParent
  lpOneSixthOfParent
  lpThreeQuarterOfParent
« Last Edit: September 08, 2016, 10:04:02 pm by A.S. »

tintinux

  • Sr. Member
  • ****
  • Posts: 311
    • Gestinux
Re: LAMW : issue with jPanel alignment
« Reply #3 on: September 08, 2016, 11:12:08 pm »
Hi

Thanks, the issue is solved for lpFiveSixthOfparent.

But there are similar problems for other values (as Anton says).

A second panel anchored below the first one and with LayoutparamHeight=lpOneSixthOfParent is not shown entirely.

Best regards
Initiator of gestinux, open-source, multi-database and multilingual accounting and billing software made with LAZARUS.

You can help to develop, to make and improve translations, and to provide examples of legal charts and reports from more countries.

jmpessoa

  • Hero Member
  • *****
  • Posts: 1623
Re: LAMW : issue with jPanel alignment
« Reply #4 on: September 09, 2016, 04:20:55 am »


Ok.

Now Others:
 
Quote
     lpThreeEighthOfParent
     lpFiveEighthOfParent
     lpSevenEighthOfParent
     lpOneSixthOfParent

Fixed!!!

Thanks!
Lamw: Lazarus Android Module Wizard
https://github.com/jmpessoa/lazandroidmodulewizard

 

TinyPortal © 2005-2018