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

# TNotebook

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

TNotebook: A series of tabbed pages placed together to make a notebook

## Declaration

Source position: extctrls.pp line 273

`type TNotebook = class(TCustomNotebook)`
`public`
`constructor Create(); override;` |  | Create - constructor for TCustomNotebook: calls inherited Create creates a pagelist, then sets initial bounds and default values for local variables and properties
`property Page: TPage; [r]` |  | The current Page of the Notebook
`property ActivePageComponent: TPage; [rw]` |  | ActivePageComponent - the actual contents of the currently selected Page
`property Pages;` |  | The contents of the Pages in the Notebook (as Strings)
`published`
`property ActivePage;` |  | ActivePage - the name (string) of the Page that is currently selected and is available for interaction
`property Align;` |  | Used to align the control to the top, bottom, left or right of its client.
`property Anchors;` |  | The set of anchor definitions for this control
`property BorderSpacing;` |  | Determines the border spacing for this control
`property Constraints;` |  | Determine Constraints (max and min height and width) for this control
`property DragCursor;` |  | DragCursor - the style of cursor to be used during the Drag process
`property DragMode;` |  | DragMode - whether manual or automatic
`property Enabled;` |  | Whether the control is Enabled (read/write). If not, it usually appears 'greyed-out'
`property Font;` |  | The font to be used for text in this control (read/write).
`property Images;` |  | Images - the list of images associated with the pages of this notebook
`property OnChangeBounds;` |  | Event handler for a change in bounds of the control
`property OnChanging;` |  | OnChanging - event handler for changing a tab
`property OnCloseTabClicked;` |  | OnCloseTabClicked - event handler for clicking on the Close button to close a tab
`property OnContextPopup;` |  | Event handler to supply information when a context-sensitive pop-up menu is required
`property OnDragDrop;` |  | Event handler for the drop of a control onto this control.
`property OnDragOver;` |  | Event handler for the case when a control is dragged over another control
`property OnEndDrag;` |  | Event handler for the end of a dragging process
`property OnEnter;` |  | OnEnter - event handler for when the mouse enters the control, and the control receives focus
`property OnExit;` |  | OnExit - event handler for when the mouse leaves the control and it loses focus
`property OnGetImageIndex;` |  | OnGetImageIndex - event handler for getting an image index
`property OnMouseDown;` |  | Event handler for when a mouse button is pressed down
`property OnMouseEnter;`
`property OnMouseLeave;`
`property OnMouseMove;` |  |
`property OnMouseUp;` |  | Event handler for when the mouse button is released, ie "up"
`property OnPageChanged;` |  | OnPageChanged - event handler for a change in the page
`property OnResize;` |  | Event Handler for resize of control
`property OnStartDrag;` |  | Event handler for start of dragging operation
`property Options;` |  | The set of Options for the Notebook: Show close buttons on the tabs, multi-line tabs
`property PageIndex;` |  | PageIndex - Index number of the current page
`property ParentFont;` |  | ParentFont - should the control use the same font as the parent? Default is true
`property PopupMenu;` |  | PopupMenu - a context-sensitive menu that pops up when the right mouse button is clicked over this control
`property ShowTabs;` |  | ShowTabs - if True (default condition), show the tabs for each page
`property TabOrder;` |  | The place this control occupies in the list of tabs
`property TabStop;`
`end;`

## Inheritance

`TNotebook` |  | TNotebook: A series of tabbed pages placed together to make a notebook
`TCustomNotebook` |  | TCustomNotebook: The base type for TNotebook and TPageControl
`TWinControl`
`TControl`
`TLCLComponent` |  | TLCLComponent - base class for LCL components
`TComponent,IUnknown,IInterfaceComponentReference`
`TPersistent`
`TObject`

## Description

TNotebook: A series of tabbed pages placed together to make a notebook

A notebook consists of several Pages, usually of similar type and kept indexed. They may contain Images listed in a table. One page is displayed at a time, but the other pages are indicated by tabs which may have their names on them, and a different page can be selected by clicking its tab

Inherits most of its properties from TCustomNoteBook

To use a Notebook, select its icon from the 'Additional' tab of the Component Palette and place it on the Form. Adjust its size, position, alignment and anchoring as required, by moving the object on the Form or by using the Object Inspector.

Tabbed Pages are added to the NoteBook by selecting the control and right-clicking with the mouse to get a pop-up menu whose first item is 'Add Page'. Pages already in the NoteBook can be edited by selecting the appropriate ActivePage in the Object Inspector and modifying its properties or adding additional components to that Page.

## See also

#lcl.StdCtrls.HowToUseStdCtrls |  | How to use StdCtrls, ComCtrls or ExtCtrls
#lcl.ExtCtrls.TPage |  | TPage: One of the pages in a tabbed Notebook
#lcl.ExtCtrls.Multi-PageControls |  | Multi-PageControls - controls that offer a selection of alternative pages for display

The latest version of this document can be found at lazarus-ccr.sourceforge.net .