TableLayoutPanel Control Sample
[This documentation is for preview only, and is subject to change in later releases. Blank topics are included as placeholders.]
This sample provides a set of forms that use the TableLayoutPanel control to implement layouts for data entry.
For information about using the samples, see the following topics:
Security Note |
---|
This sample code is provided to illustrate a concept and should not be used in applications or Web sites, as it may not illustrate the safest coding practices. Microsoft assumes no liability for incidental or consequential damages should the sample code be used for purposes other than as intended. |
Demonstrates how to use a TableLayoutPanel control to create layouts that can be easily resized.
To build and run the sample using the command prompt
At the command prompt, navigate to the location where you saved the uncompressed sample files.
Navigate to one of the language-specific subdirectories under the TableLayoutPanelSample directory.
Type msbuild to build the sample using the solution (.sln) file provided.
Type cd TableLayoutPanelSample\bin\Debug to navigate to the location of the executable file.
Type TableLayoutPanelSample.exe to run the sample.
To build and run the sample using Visual Studio
In Windows Explorer, navigate to the location where you saved the uncompressed sample files.
Navigate to one of the language-specific subdirectories under the TableLayoutPanelSample directory.
Double-click the solution (.sln) file to open it in Visual Studio.
In Visual Studio, press F5 to build and run the sample.
To use the TableLayoutPanelSample
In the Form to View ComboBox control, select the form you want to view. The Form Description field describes the different forms.
Click the View Form button to start the selected form.
Demonstrates
Proportional resizing of a layout with two main panes, and two button controls at fixed positions within a central column.
A simple data entry form, using the TableLayoutPanel control to yield simple but robust resizing behavior. A single TableLayoutPanel control encompasses all controls except for the two buttons at the bottom of the form.
See Also
Tasks
How to: Design a Windows Forms Layout that Responds Well to Localization
How to: Create a Resizable Windows Form for Data Entry