Class TCastlePackedGroup
Unit
CastleControls
Declaration
type TCastlePackedGroup = class(TCastleUserInterface)
Description
Abstract ancestor for containers that pack children, like TCastleHorizontalGroup and TCastleVerticalGroup.
Hierarchy
Overview
Fields
Methods
Properties
Description
Fields
|
FPackingValid: boolean; |
|
|
nested const DefaultPadding = 0; |
|
|
nested const DefaultSpacing = 0; |
|
Methods
|
procedure DoPackChildren(out InsideWidth, InsideHeight: Single); virtual; abstract; |
|
|
procedure PreferredSize(var PreferredWidth, PreferredHeight: Single); override; |
|
|
constructor Create(AOwner: TComponent); override; |
|
|
destructor Destroy; override; |
|
|
procedure BeforeRender; override; |
|
|
procedure Render; override; |
|
|
procedure EditorAllowResize(out ResizeWidth, ResizeHeight: Boolean; out Reason: String); override; |
|
Properties
|
property FrameColor: TCastleColor read FFrameColor write SetFrameColor; |
If Frame, this is the frame's color. By default white.
|
|
property Frame: boolean read FFrame write SetFrame default false; |
|
|
property Padding: Single read FPadding write SetPadding default DefaultPadding; |
|
|
property Spacing: Single read FSpacing write SetSpacing default DefaultSpacing; |
|
|
property AutoSizeWidth: Boolean
read FAutoSizeWidth write SetAutoSizeWidth default true; |
Whether the control's size is automatically adjusted to wrap children tightly.
Be careful to not create a recursive loop! Group's size calculation always looks at children size (even when auto-size is off, since it needs to arrange children next to each other anyway). This means that children size cannot depend on a parent. So a direct child of TCastleVerticalGroup or TCastleHorizontalGroup cannot use FullSize, or WidthFraction or HeightFraction. This would create a loop in calculations, which would be forcefully resolved by some control having undefined size.
So, you can only deactivate auto-size on a group if all children have explicitly defined size using their Width and Height properties.
|
|
property AutoSizeHeight: Boolean
read FAutoSizeHeight write SetAutoSizeHeight default true; |
|
|
property FrameColorPersistent: TCastleColorPersistent read FFrameColorPersistent ; |
FrameColor that can be visually edited in Castle Game Engine Editor, Lazarus and Delphi. Normal user code does not need to deal with this, instead read or write FrameColor directly.
See also
- FrameColor
- If Frame, this is the frame's color.
|
Generated by PasDoc 0.16.0.