[Overview][Constants][Types][Classes][Procedures and functions][Index] Reference for unit 'StdCtrls' (#lcl)

TCustomScrollBar

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

The base class for TScrollBar.

Declaration

Source position: stdctrls.pp line 68

type TCustomScrollBar = class(TWinControl)

protected

  class procedure WSRegisterClass; override;

  

Registers the widgetset class created for new instances of the control.

  class function GetControlClassDefaultSize; override;

  

Gets the default size for new instances of the class.

  procedure CreateParams(); override;

  

Initializes the creation parameters for the class instance.

  procedure CreateWnd; override;

  

CreateWnd - calls inherited CreateWnd then initializes various Scroll Info properties.

  procedure Change; virtual;

  

Invokes the OnChange event handler for the control.

  procedure Scroll(); virtual;

  

Signals the OnScroll event handler.

  procedure CalculatePreferredSize(); override;

  

Gets the preferred size for new instances of the class.

public

  constructor Create(); override;

  

Constructor for the class instance.

  procedure SetParams();

  

Updates the Min and Max values, the size of the page, and the position in the scrollbar.

  property Kind: TScrollBarKind; [rw]

  

Contains the scrollbar orientation, horizontal or vertical.

  property LargeChange: TScrollBarInc; [rw]

  

The distance to scroll on an click beneath the slider.

  property Max: Integer; [rw]

  

The maximum value for the bottom or right position depending on orientation.

  property Min: Integer; [rw]

  

The minimum value for the top or left position depending on orientation.

  property PageSize: Integer; [rw]

  

The size of the slider relative to the total scroll range.

  property Position: Integer; [rw]

  

The position of the slider in the scrollbar.

  property SmallChange: TScrollBarInc; [rw]

  

The distance to scroll when the up or down button is clicked.

  property TabStop: Boolean;

  

Enables keyboard navigation using the Tab or Shift+Tab keys.

  property OnChange: TNotifyEvent; [rw]

  

Event handler signalled when the value in Position, Min, Max, or PageSize is changed.

  property OnScroll: TScrollEvent; [rw]

  

Event handler signalled when scrollbar messages are applied.

end;

Inheritance

TCustomScrollBar

  

The base class for TScrollBar.

|

TWinControl

  

Implements a windowed control which can contain other child controls.

|

TControl

  

The base class for visible controls.

|

TLCLComponent

  

The base class for LCL components which have an associated widget.

|

TComponent,IUnknown,IInterfaceComponentReference

|

TPersistent,IFPObserved

|

TObject

Description

TCustomScrollBar is a TWinControl descendant which defines the base class for a scrollbar, such as TScrollBar. TCustomScrollBar can be used for horizontal or vertical scrollbars displayed on a form or scrolling window control.

A scrollbar allows the content in a client area to be scrolled when it extends beyond the window bounds. TCustomScrollBar provides the properties, methods, and events needed to interface with the widgetset class for the platform or operating system.

Use the Kind property to specify the orientation for the scrollbar.

Use Min, Max, SmallChange, LargeChange, PageSize and Position properties to control the scrolling behavior for the scrollbar.

Use the OnChange and OnScroll event handlers to respond to programmatic changes to the scrollbar, or messages received from the widgetset class.

See TControlScrollBar for information about scrollbars used for windowed controls.

See also

TScrollBar

  

A control that allows the user to scroll the content in an associated control by moving a slider.

TScrollingWinControl

  

Implements a windowed control with scroll bars.

TControlScrollBar

  

Scroll bar type used in TScrollingWinControl.

TWinControl

  

Implements a windowed control which can contain other child controls.


Version 3.2 Generated 2024-02-25 Home