Control sizes on a form

0
0

Hi Team,

How can I set the controls to stretch depending on the screen size? On a small screen(14″) I can see controls resized correctly on a form but on a larger screen, it appears tiny.

 

Please assist.

  • You must to post comments
0
0

Hi Sam,

It depends on your needs, it is best to host your controls inside a FlowLayoutPanel or a FlexLayoutPanel.

Both of those controls have the ability to automatically adjust the control size to fit the container.

You can checkout our documentation, it covers all grounds for you to get started, we also have several books that you can checkout.

I would also encourage you to take a look at the DemoBrowser application we have online, it’s open source and filled with all the samples and demos you need!

Best,
Alaa

 

 

  • You must to post comments
0
0

Hi Alaa,

 

What is the best practise or recommended way of placing controls(input box, drop downs, grid) on a form?

 

Thanks

  • You must to post comments
0
0

Okay…I just introduced the table layout panel to try the resizing issue. However initially I had just placed the controls on panels without putting them in rows and columns.

 

Let me try that. Thanks for your help.

  • You must to post comments
0
0

Hi Alaa,

 

Thanks for your prompt answer. Yes, I have used Dock property. Anchor is set to Top-Left

Should I set the doc properties of controls themselves or the containers?

I have controls(text boxes and comboboxes) on an accordion panel whose Dock property is set to Fill, which I have placed it in on a table layout panel which has a property Dock as Fill

 

Thanks

  • Alaa (ITG)
    Hi Sam, the Dock and Anchor properties should be set to both the containers and the controls. For example, if you want both the TableLayoutPanel to fill the screen and a combobox to fill a column, you’ll have to set both the TableLayoutPanel and ComboBox to Dock property to Fill, another thing is that the TableLayoutPanel has both the RowSpan and ColSpan properties, basically, any control can adjust it’s size to fill X columns and Y rows!
  • You must to post comments
0
0

Hi Sam,

Thank you for contacting support.

Have you used the Anchor and Dock properties of the controls?

You can use them to stretch the controls in their containers.

Best,
Alaa

  • You must to post comments
Showing 5 results
Your Answer

Please first to submit.