I have a Page with a FlowLayoutPanel p, p.FlowDirection=TopDown. Inside I have a number of comboBox and TextBox controls, all of them with Dock=Fill.
It loock perfect on portrait mode, but very weird on landscape (there is no responsive profile procedure, because I consider the Dock=Fill will do the job).
In default.html I have <meta name=”viewport” content=”width=device-width, initial-scale=1″>
I attached 2 screenshots (portrait and landscape) and the Designer.cs file.
Please advice.
Thank you, Adrian
Hi Adrian,
you need to change the WrapContents of your FlowLayoutPanel to false, then it should all work like you’d expected it.
Best regards
Frank
Hi Frank,
You are fast for sure!
Your modified project (and initially mine with the modification indicated by you) looks the same as the original one (well, maybe the padding is increased a little bit). I can give you a link to the site if you want to test on a mobile. I don’t know if I should write the link here, as it is my test server.
Hi Adrian,
thanks for the sample. You should remove Dock=Fill from all your child elements and instead anchor them to Top, Left and Right.
See modified sample.
Best regards
Frank
Hi Frank,
I attached a (very basic) sample project that perfectly reproduce my problem. I also uploaded two screenshots. As you can see, on landscape the last 2 textboxes are (probably) in the upper right corner and the buttons are not shown.
Thank you,
Adrian
Hi Adrian,
please attach a compilable and runnable test application, then we can take a closer look at it.
Best regards
Frank
Hi Paul,
Thank you for your answer. The situation is quite different. In your scenario, you set the combos and textboxes width and Dock=None, and set fixed size of flowLayoutPanel.
In my case, I tried that:
Trying to add your code on my page resulted in a total mess, especially when returning from landscape to portrait (see attached screenshots). If possible, direct me how to obtain that goal: all controls width=screen width and vertical scroll if necessary, on both portrait and landscape.
Thank you!
Hi Adrian
I hope that my sample code could help you
Just add code for the Page event ClientSizeChange and check the main page With property
I also atach the code sample
Regards