Adapt Form to Layout Size

Hi!

I'm testing the FLOWLAYOUT and it's really too much easier and powerfull than the original MS LayoutGrid. Congrats!
My setting is:

Alignment = Center
AutoHeight = True
AutoLayout = True 
LayoutMode = Horizontal

But I have a question: is there any way to force my form to have its width as near as possible of the FlowLayout "real" size, to avoid "empty" margins?

I mean, when I grow up or shrink the form, the FlowLayout adapts the contained controls accordingly - that's ok and great!  But we can see "margins" between the window left border and the left edge of first control, and also between the right edge of the last control (in the first row) and the window right border; and I would like to set the form to the nearest possible value of the FlowLayout width to avoid these "empty margins".

Something like this:

FlowLayout.Left = 10   << leftmost but with 10 points of the window left border

Window.Width = FlowLayout.Width

Is there any way to do it?

Thank you very much!




8 Replies 1 reply marked as answer

VR Vijayalakshmi Roopkumar Syncfusion Team October 14, 2020 05:17 PM UTC

Hi David, 
 
Thank you for using Syncfusion Products. 
 
We have checked your requirement and understood that you want to dock the FlowLayout to the full form size. If this is your requirment, we will check and update you the analysis details by 16th Oct , 2020. If our understanding on your requirement is different , please share screenshot that you exactly achieve with FlowLayout control. We will check and update you the details based on it. 
 
Please let us know if you have any other concerns. 
 
Regards, 
Vijayalakshmi VR 



DA DavidBS October 15, 2020 12:58 AM UTC

Dear Roopkumar,

The control is already set to occupy the entire form using:
Autoheight = True
Alignment = Center
AutoLayout = true
BottomMargin = 8
LayoutMode = horizontal
TopMargin = 70 (I need this because my form is a customized one)

It functions exactly as I want, but as you can see in images, when the user changes the form size horizontally, during some moments, while the gap between the control and the form width is not enough for a new rearrangement, the form shows "margins" between its real size and the layout displayed. It is NOT a problem of the control, I can see this - there is no available space to FlowLayout fulfill these gaps with a new contained button.

What I would like to do (and I can do using the Windows LayoutGrid), is adapt the form width to the (almost) exact Layout width, avoiding any "margin" or gap between the form and the buttons within. Something like:

Form1.width = Layout.Left + Layout.Width + 10

See the images - I guess they can show what I'm talking about more easily.

Just in time: if you set any form's control as CONSTRAINT= FALSE, I can position it at any location, but its ANCHOR property gets lost. It would be great if you could also keep this control property.

Thank you very much for your whole patience and feel free to get more details, if needed.

Kindest regards,
David

Attachment: sample_eddc40e1.rar


VR Vijayalakshmi Roopkumar Syncfusion Team October 15, 2020 05:04 PM UTC

Hi David,

Thank you for your update.

We are currently checking the possibility to achieve the reported requirement with FlowLayout control. We will check and update you the complete details by 19th Oct, 2020.

Please let us know if you have any other concerns.

Regards,
Vijayalakshmi VR


DA DavidBS October 15, 2020 05:39 PM UTC

Thank YOU Roopkumar!

Kindest regards,
David


EM Elakkiya Muthukumarasamy Syncfusion Team October 16, 2020 04:25 AM UTC

Hi David, 
 
Thanks for your update. 
  
Most Welcome. Let us know if you need any assistance. 
  
Regards, 
Elakkiya 



VR Vijayalakshmi Roopkumar Syncfusion Team October 20, 2020 06:16 PM UTC

Hi David 
 
Thank you for your patience. 
 
We have checked the feasibility to maintain the your margin settings for child control in FlowLayout control. But in FlowLayout LayoutManager, it does not support Autosize and it does not adjust the size fully according to the Form size and there would be some space maintained always between the child controls and Form. However, we recommend you to use the GridLayout LayoutManager to achieve your requirement, in which we can arrange the child controls in rows and columns layout. 
 
For more information about GridLayout, refer the following UG : 
 
 
Regards, 
Vijayalakshmi VR 


Marked as answer

DA DavidBS October 20, 2020 08:07 PM UTC

You're pretty welcome Roopkumar,

I know you all had tried the best to a solution to my question.
I'll see what you recommend but I'm affraid the current Layout may be more powerfull and easy-to-use than Grid.

Anyway, let's see it.

Thank you very much for your support.

Kindest regards,
David


VR Vijayalakshmi Roopkumar Syncfusion Team October 21, 2020 04:44 AM UTC

Hi David 
 
Thank you for your update. 
 
Please let us know if you need any further assistance. 
 
Regards, 
Vijayalakshmi VR 


Loader.
Up arrow icon