Jump to content

How Do I Design The Layout?


Frederick

Recommended Posts

I have the following main form (Alignment Control = uniAlignmentClient) where my form's layout is "Fit", a container panel where the layout is "Vbox" and 3 TUniPanels where their properties are in the caption. 

Panel 1's height is fixed and is supposed to be aligned to the top while Panel 3's height is also fixed and aligned to the bottom and Panel 2's height is supposed to be dynamic between panels 1 and 3..

As you can see, after running the project, I can't get panel 3 to be at the bottom and panel 2's height to be dynamic. Furthermore, when I resize the web browser, the panels do not resize horizontally to fit.

What am I missing here?

--
Frederick
(UniGUI Complete - Professional Edition 1.90.0.1565)

layout2.png

layout2run.png

Link to comment
Share on other sites

8 minutes ago, albertovesx said:

"I can't get panel 3 to be at the bottom"

for that use CreateOrder property

Unfortunately, setting this property does not give me the effect I want.

I've decided to use uniAlignmentServer instead of uniAlignmentClient and use the Align properties for each panel to get the layout I want as I am short of time.

Thanks.

Link to comment
Share on other sites

11 hours ago, Frederick said:

 

layout2run.png

Hello Frederick,

Very easy :)

• ServerModule: MainFormDisplayMode:= mfPage

• Mainform > ClientAligment

• Adjust Flex property for each Panel.

Here is in attachment, an example for mobile layout, but the same idea for Desktop.

You have to play with :

• Flex

• width  : 100% 

• Height 100%

• vbox

• Hbox

• Fit

• margin

...

http://forums.unigui.com/index.php?/topic/15007-mobile-centering-text/

 

Also, there are many example on forum. Just type layout....

Link to comment
Share on other sites

7 hours ago, andyhill said:

Put up test code and image of desired result and I will look at it for you

Thanks for the offer, Andy. I think that I managed to figure out the basic steps to get the layout I want, with input from Abaksoft as well. The only thing I am trying to wrap my head around is the Flex property. I will study this more later.

My basic design layout is attached.

Link to comment
Share on other sites

2 hours ago, d.bernaert said:

This can also be done easily with the following configuration:

Alignment: client

Form layout: border

Upper panel: region: north

Mid panel: region: center

Bottom panel: region south

Does using regions dispense the need to specify the height and width in the LayoutConfig property?

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...