Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Important This document may not represent best practices for current development, links to downloads and other resources may no longer be valid. Current recommended version can be found here.

TableLayoutPanel Control Sample

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 noteSecurity 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

  1. At the command prompt, navigate to the location where you saved the uncompressed sample files.

  2. Navigate to one of the language-specific subdirectories under the TableLayoutPanelSample directory.

  3. Type msbuild to build the sample using the solution (.sln) file provided.

  4. Type cd TableLayoutPanelSample\bin\Debug to navigate to the location of the executable file.

  5. Type TableLayoutPanelSample.exe to run the sample.

To build and run the sample using Visual Studio

  1. In Windows Explorer, navigate to the location where you saved the uncompressed sample files.

  2. Navigate to one of the language-specific subdirectories under the TableLayoutPanelSample directory.

  3. Double-click the solution (.sln) file to open it in Visual Studio.

  4. In Visual Studio, press F5 to build and run the sample.

To use the TableLayoutPanelSample

  1. In the Form to View ComboBox control, select the form you want to view. The Form Description field describes the different forms.

  2. Click the View Form button to start the selected form.

  • 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.

Community Additions

ADD
Show:
© 2015 Microsoft