LayoutControl
        Inherits: Control
Properties
- 
          align(Alignment | None) –Alignment of the control within its parent. 
- 
          animate_align(AnimationValue | None) –Enables implicit animation of the alignproperty.
- 
          animate_margin(AnimationValue | None) –Enables implicit animation of the marginproperty.
- 
          animate_offset(AnimationValue | None) –Enables implicit animation of the offsetproperty.
- 
          animate_opacity(AnimationValue | None) –Enables implicit animation of the opacityproperty.
- 
          animate_position(AnimationValue | None) –Enables implicit animation of the positioning properties 
- 
          animate_rotation(AnimationValue | None) –Enables implicit animation of the rotateproperty.
- 
          animate_scale(AnimationValue | None) –Enables implicit animation of the scaleproperty.
- 
          animate_size(AnimationValue | None) –TBD 
- 
          aspect_ratio(Number | None) –The aspect ratio of the control. 
- 
          bottom(Number | None) –The distance that the child's bottom edge is inset from the bottom of the stack. 
- 
          height(Number | None) –Imposed Control height in virtual pixels. 
- 
          left(Number | None) –The distance that the child's left edge is inset from the left of the stack. 
- 
          margin(MarginValue | None) –Sets the margin of the control. 
- 
          offset(OffsetValue | None) –Applies a translation transformation before painting the control. 
- 
          right(Number | None) –The distance that the child's right edge is inset from the right of the stack. 
- 
          rotate(RotateValue | None) –Transforms this control using a rotation around its center. 
- 
          scale(ScaleValue | None) –Scales this control along the 2D plane. Default scale factor is 1.0,
- 
          top(Number | None) –The distance that the child's top edge is inset from the top of the stack. 
- 
          width(Number | None) –Imposed Control width in virtual pixels. 
Events
- 
          on_animation_end(ControlEventHandler[LayoutControl] | None) –Called when animation completes. 
Properties#
class-attribute
      instance-attribute
  
#
align: Alignment | None = None
Alignment of the control within its parent.
class-attribute
      instance-attribute
  
#
animate_align: AnimationValue | None = None
class-attribute
      instance-attribute
  
#
animate_margin: AnimationValue | None = None
class-attribute
      instance-attribute
  
#
animate_offset: AnimationValue | None = None
class-attribute
      instance-attribute
  
#
animate_opacity: AnimationValue | None = None
class-attribute
      instance-attribute
  
#
animate_position: AnimationValue | None = None
class-attribute
      instance-attribute
  
#
animate_rotation: AnimationValue | None = None
class-attribute
      instance-attribute
  
#
animate_scale: AnimationValue | None = None
class-attribute
      instance-attribute
  
#
aspect_ratio: Number | None = None
The aspect ratio of the control. It is defined as the ratio of the width to the height.
class-attribute
      instance-attribute
  
#
bottom: Number | None = None
The distance that the child's bottom edge is inset from the bottom of the stack.
Note
Effective only if this control is a descendant of one of the following:
Stack control, Page.overlay list.
class-attribute
      instance-attribute
  
#
height: Number | None = None
Imposed Control height in virtual pixels.
class-attribute
      instance-attribute
  
#
left: Number | None = None
The distance that the child's left edge is inset from the left of the stack.
Note
Effective only if this control is a descendant of one of the following:
Stack control, Page.overlay list.
class-attribute
      instance-attribute
  
#
margin: MarginValue | None = None
Sets the margin of the control.
class-attribute
      instance-attribute
  
#
offset: OffsetValue | None = None
Applies a translation transformation before painting the control.
The translation is expressed as an Offset scaled to the control's size.
So, Offset(x=0.25, y=0), for example, will result in a horizontal translation
of one quarter the width of this control.
Example
The following example displays container at 0, 0 top left corner of a stack as
transform applies -1 * 100, -1 * 100 (offset * control's size) horizontal and
vertical translations to the control:
class-attribute
      instance-attribute
  
#
right: Number | None = None
The distance that the child's right edge is inset from the right of the stack.
Note
Effective only if this control is a descendant of one of the following:
Stack control, Page.overlay list.
class-attribute
      instance-attribute
  
#
rotate: RotateValue | None = None
Transforms this control using a rotation around its center.
The value of rotate property could be one of the following types:
- number- a rotation in clockwise radians. Full circle- 360°is- math.pi * 2radians,- 90°is- pi / 2,- 45°is- pi / 4, etc.
- Rotate- allows to specify rotation- angleas well as- alignment- the location of rotation center.
class-attribute
      instance-attribute
  
#
scale: ScaleValue | None = None
Scales this control along the 2D plane. Default scale factor is 1.0,
meaning no-scale.
Setting this property to 0.5, for example, makes this control twice smaller,
while 2.0 makes it twice larger.
Different scale multipliers can be specified for x and y axis, by setting
Control.scale property to an instance of Scale class.
Either scale or scale_x and scale_y could be specified, but not all of them.
class-attribute
      instance-attribute
  
#
top: Number | None = None
The distance that the child's top edge is inset from the top of the stack.
Note
Effective only if this control is a descendant of one of the following:
Stack control, Page.overlay list.
class-attribute
      instance-attribute
  
#
width: Number | None = None
Imposed Control width in virtual pixels.
Events#
class-attribute
      instance-attribute
  
#
on_animation_end: (
    ControlEventHandler[LayoutControl] | None
) = None
Called when animation completes.
Can be used to chain multiple animations.
The data property of the event handler argument contains the name
of the animation.
More information here.