TSlideContainer
Animated slide panel component. Slides in from left, right, top, or bottom with configurable animation modes.
ContainerAnimation
Overview
TSlideContainer provides animated sliding panels for sidebars, drawers, and overlays. Used internally by TMultiContainer for Left/Right/Header panels.
Published Properties
| Property | Type | Default | Description |
|---|---|---|---|
| SlideEnabled | Boolean | True | Whether sliding is enabled. |
| SlideSide | TSlideSide | ssSlideFromLeft | Direction: ssSlideFromLeft, ssSlideFromRight, ssSlideDown, ssSlideUp. |
| SlideMode | TSlideMode | smOverlap | How panel interacts: smOverlap (over content), smShrink (pushes content). |
| SlideWidth | Integer | 280 | Width/height of panel when open. |
| SlideTopOffset | Integer | 0 | Offset from top (header clearance). |
| SlideBottomOffset | Integer | 0 | Offset from bottom (footer clearance). |
| State | TFormState | fsEnabled | State: fsEnabled, fsDisabled, fsSlideOpen, fsSlideClosed. |
Public Methods
PROCEDURE SlideIn;
Slides the panel into view with animation.
PROCEDURE SlideOut;
Slides the panel out of view with animation.
FUNCTION ToggleSlide: Boolean;
Toggles between open/closed. Returns True if now open.
PROCEDURE SetAnimationTarget(Target: TControl);
Sets the control to shrink when using smShrink mode.
Usage Example
// Toggle sidebar
Sidebar.ToggleSlide;
// Programmatic control
IF UserWantsMenu THEN
Sidebar.SlideIn
ELSE
Sidebar.SlideOut;