Recent

Author Topic: LayoutManager on Lazarus?  (Read 692 times)

guest64953

  • Guest
LayoutManager on Lazarus?
« on: December 09, 2019, 04:05:06 pm »
Is there anything equivalent to LayoutManager on Java Swing? I found Lazarus use something like AbsoluteLayout by default. When I maximize the Windows, the buttons are still on their old coordinates. So how to make your app look consistent, let alone adapt to different screen size?  :o

p/s: I'm not Delphi developer so don't point me to Delphi, please  :D

Handoko

  • Hero Member
  • *****
  • Posts: 3636
  • My goal: build my own game engine using Lazarus
Re: LayoutManager on Lazarus?
« Reply #1 on: December 09, 2019, 04:17:42 pm »
I do not follow the discussion but recently people are talking "Modern UI in Lazarus". I believe you may find what you want there.

MacWomble

  • Jr. Member
  • **
  • Posts: 77
Re: LayoutManager on Lazarus?
« Reply #2 on: December 09, 2019, 04:27:00 pm »
You should use anchors  ....
Mint 19.3 Cinnamon, FPC/ Lazarus Trunk 64Bit

marcov

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 8590
  • FPC developer.
Re: LayoutManager on Lazarus?
« Reply #3 on: December 09, 2019, 04:27:07 pm »
There is a layout manager built into the LCL. Component properties like alignment and anchors are parameters for this layout manager.

The "modern ui in lazarus" is a (very early) attempt at a different, more web oriented rendering where layout managers places components very roomy, and as a consequence often needs vertical scrolling.

guest64953

  • Guest
Re: LayoutManager on Lazarus?
« Reply #4 on: December 13, 2019, 05:01:53 am »
There is a layout manager built into the LCL. Component properties like alignment and anchors are parameters for this layout manager.

The "modern ui in lazarus" is a (very early) attempt at a different, more web oriented rendering where layout managers places components very roomy, and as a consequence often needs vertical scrolling.

I'm still troubled with Layout handling on Lazarus. But at least I could use anchor now, still have no idea about align, autosize or layout/childsizing...  %)

 

TinyPortal © 2005-2018