TGridPanel = class(TCustomGridPanel)
class PASCALIMPLEMENTATION TGridPanel : public TCustomGridPanel
TGridPanel implements a grid panel control in which each component is placed within a cell on a grid.
Use TGridPanel to put an empty grid panel on a form. The major difference between a traditional panel and a grid panel is the way in which controls are placed. With a traditional panel, you place a control (such as a button) in a specific location. You can freely move that control to any location within the panel using the mouse. In a grid panel, you specify the number of rows and columns on the panel, then each component is placed into the next available cell in the grid, regardless of where you place it with the mouse. You can also change the alignment of each column and row by selecting one and setting the Value desired in the Object Inspector. To properly setup columns / rows, you should:
- Right click on TGridPanel, and choose "Disable Relayout"
- Set up the columns / rows width values
- Right click on TGridPanel, and choose "Enable Relayout"
If each grid contains a control and you add more controls, the location for the new controls is determined by the ExpandStyle property. For example, using the default ExpandStyle property of AddRows, a new row is added to the grid, and each cell in the row can contain a new control.