Vcl.ExtCtrls.TGridPanel

From RAD Studio API Documentation
Jump to: navigation, search

Vcl.ExtCtrls.TCustomGridPanelVcl.ExtCtrls.TCustomPanelVcl.Controls.TCustomControlVcl.Controls.TWinControlVcl.Controls.TControlSystem.Classes.TComponentSystem.Classes.TPersistentSystem.TObjectTGridPanel

Delphi

TGridPanel = class(TCustomGridPanel)

C++

class PASCALIMPLEMENTATION TGridPanel : public TCustomGridPanel

Properties

Type Visibility Source Unit Parent
class public
Vcl.ExtCtrls.pas
Vcl.ExtCtrls.hpp
Vcl.ExtCtrls Vcl.ExtCtrls

Description

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:

  1. Right click on TGridPanel, and choose "Disable Relayout"
  2. Set up the columns / rows width values
  3. 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.

See Also