Note: constraints are now deprecated and you should use sizers instead.
Objects of this class can be associated with a window to define its layout constraints, with respect to siblings or its parent.
The class consists of the following eight constraints of class wxIndividualLayoutConstraint, some or all of which should be accessed directly to set the appropriate constraints.
Most constraints are initially set to have the relationship wxUnconstrained, which means that their values should be calculated by looking at known constraints. The exceptions are width and height, which are set to wxAsIs to ensure that if the user does not specify a constraint, the existing width and height will be used, to be compatible with panel items which often have take a default size. If the constraint is wxAsIs, the dimension will not be changed.
wxPerl note: In wxPerl the constraints are accessed as
constraint = Wx::LayoutConstraints->new(); constraint->centreX->AsIs(); constraint->centreY->Unconstrained();
Derived from
Include files
<wx/layout.h>
See also
Overview and examples, wxIndividualLayoutConstraint, wxWindow::SetConstraints
Members
wxLayoutConstraints::wxLayoutConstraints
wxLayoutConstraints::bottom
wxLayoutConstraints::centreX
wxLayoutConstraints::centreY
wxLayoutConstraints::height
wxLayoutConstraints::left
wxLayoutConstraints::right
wxLayoutConstraints::top
wxLayoutConstraints::width
wxLayoutConstraints()
Constructor.
wxIndividualLayoutConstraint bottom
Constraint for the bottom edge.
wxIndividualLayoutConstraint centreX
Constraint for the horizontal centre point.
wxIndividualLayoutConstraint centreY
Constraint for the vertical centre point.
wxIndividualLayoutConstraint height
Constraint for the height.
wxIndividualLayoutConstraint left
Constraint for the left-hand edge.
wxIndividualLayoutConstraint right
Constraint for the right-hand edge.
wxIndividualLayoutConstraint top
Constraint for the top edge.
wxIndividualLayoutConstraint width
Constraint for the width.