From RAD Studio API Documentation
Jump to: navigation, search


property Constraints: TSizeConstraints read FConstraints write SetConstraints;


__property TSizeConstraints* Constraints = {read=FConstraints, write=SetConstraints};


Type Visibility Source Unit Parent
property public
Vcl.Controls TControl


Specifies the size constraints for the control.

Use Constraints to specify the minimum and maximum width and height of the control. When Constraints contains maximum or minimum values, the control cannot be resized to violate those constraints.

Note: Constraints apply to the height of the form. However, the height of the form depends on how large Windows makes the title bar. For example, Windows XP uses much larger title bars than other windowing systems. To work around this, note the ClientHeight when you design your form and set the constraints in the FormCreate event. In the following example, ClientHeight is represented by x: Constraints.MinHeight := x + Height - ClientHeight.

Warning: Do not set up constraints that conflict with the value of the Align or Anchors property. When these properties conflict, the response of the control to resize attempts is not well-defined.

See Also