Class TCastleScrollView
Unit
CastleControls
Declaration
type TCastleScrollView = class(TUIControlSizeable)
Description
Children added to ScrollArea can be scrolled vertically. We automatically show a scrollbar, and handle various scrolling inputs to be functional on both desktops and mobile (we handle scrolling by keys, mouse wheel, dragging by scrollbar, dragging the whole area - see EnableDragging).
Hierarchy
Overview
Fields
Methods
Properties
Description
Fields
 |
internal const DefaultKeyScrollSpeed = 200.0; |
|
 |
internal const DefaultWheelScrollSpeed = 20.0; |
|
 |
internal const DefaultScrollBarWidth = 20; |
|
Methods
 |
constructor Create(AOwner: TComponent); override; |
|
 |
destructor Destroy; override; |
|
 |
procedure Render; override; |
|
 |
procedure RenderOverChildren; override; |
|
 |
function Motion(const Event: TInputMotion): boolean; override; |
|
 |
procedure Update(const SecondsPassed: Single; var HandleInput: boolean); override; |
|
Properties
 |
property TintScrollBarInactive: TCastleColor read FTintScrollBarInactive write FTintScrollBarInactive; |
Color and alpha tint to use when scrollbar is not used. May have some alpha, which makes scrollbar "make itself more opaque", and thus noticeable, when you start dragging. By default it's opaque white, which means that no tint is shown.
|
 |
property ScrollArea: TUIControlSizeable read FScrollArea; |
Children you add here will be scrolled. Make sure to add some children here, and set proper size of this control, to have a useful scrolling area.
|
 |
property KeyScrollSpeed: Single read FKeyScrollSpeed write FKeyScrollSpeed default DefaultKeyScrollSpeed; |
Speed of scrolling by keys, in pixels (before UI scaling) per second.
|
 |
property WheelScrollSpeed: Single read FWheelScrollSpeed write FWheelScrollSpeed default DefaultWheelScrollSpeed; |
Speed of scrolling by mouse wheel, in pixels (before UI scaling) per event.
|
 |
property ScrollBarWidth: Cardinal read FScrollBarWidth write FScrollBarWidth default DefaultScrollBarWidth; |
Width of the scroll bar.
|
 |
property EnableDragging: boolean read FEnableDragging write FEnableDragging default false; |
Enable scrolling by dragging anywhere in the scroll area. This is usually suitable for mobile devices. Note that this doesn't affect the dragging directly by the scrollbar, which is always enabled.
|
Generated by PasDoc 0.15.0.
|