* * *

Author Topic: LAMW : Margin Dose not changed ?why  (Read 199 times)

majid.ebru

  • Jr. Member
  • **
  • Posts: 98
LAMW : Margin Dose not changed ?why
« on: April 17, 2017, 11:12:41 am »
Hi
in LAMW project,i just put 1 jPanel in the form and :

Code: Pascal  [Select]
  1.       jPanel1.LayoutParamHeight:=lpMatchParent;
  2.       jPanel1.LayoutParamWidth:= lpMatchParent;
  3.       jPanel1.PosRelativeToParent:=[rpTop];
  4.  
.
and in rotate event :

Code: Pascal  [Select]
  1. procedure TAndroidModule1.AndroidModule1Rotate(Sender: TObject;
  2.   rotate: TScreenStyle);
  3. begin
  4.   case rotate of
  5.     ssLandscape:   begin
  6.       jPanel1.MarginBottom:= 50;
  7.       jPanel1.MarginLeft:= 10;
  8.       jPanel1.MarginRight:=10;
  9.       jPanel1.MarginTop:= 50;
  10.       ShowMessage('Rotate ssLandscape');
  11.     end;
  12.     ssPortrait:   begin
  13.       jPanel1.MarginBottom:= 10;
  14.       jPanel1.MarginLeft:= 50;
  15.       jPanel1.MarginRight:=50;
  16.       jPanel1.MarginTop:= 10;
  17.       ShowMessage('Rotate ssPortrait');
  18.     end;
  19.   end;
  20.   Self.UpdateLayout;
  21. end;  
  22.  
.
.
but margin numbers dose not change?why?
.
help me please
.
Thank you

majid.ebru

  • Jr. Member
  • **
  • Posts: 98
Re: LAMW : Margin Dose not changed ?why
« Reply #1 on: April 20, 2017, 02:58:41 pm »
Hi
doesn't any idea? :o

jmpessoa

  • Hero Member
  • *****
  • Posts: 846
Re: LAMW : Margin Dose not changed ?why
« Reply #2 on: April 21, 2017, 04:09:55 am »

jPanel Fixed!

Please, use the new method "SetMarginLeftTopRightBottom"

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

 

Recent

Get Lazarus at SourceForge.net. Fast, secure and Free Open Source software downloads Open Hub project report for Lazarus