This is extremely useful while placing multitudes of controls on a form in a correct and orderly fashion. You can add as many rows/columns to the layout. ![]() ![]() One cell of the table will take only one control. When you add a control to a cell of the table, it would reposition itself to the center of the cell. In TableLayoutPanel, the arrangement is in a tabular format as the name itself suggests. The automatic wrapping functionality as I explained earlier also can be set by a property called 'WrapContents'. For this you have to set the property 'FlowDirection'. You can also decide on the direction in which the controls will flow. See a screehshot to get a feel of it in action. I found this to be very useful while placing many triplets of label->textbox->button controls one below the other and close to each other. ![]() If the right side of the previous control does not have enough space, it would wrap itself to the next available space at the bottom. In the FlowLayoutPanel, whatever controls that you place in the panel, will rearrange itself to right of the previous control, in a flowing model. This is apart from the regular 'Panel' control that is included with the previous versions also.īoth of these controls give tremendous control and ease in placing the controls properly and in an orderly fashion on the form. There are two interesting components which I noticed in the Windows Forms Toolbox (Visual Studio 2005), which I would like to point out here.
0 Comments
Leave a Reply. |