A multi-page container with rectangular tabs on top.

Syntax

[<oRef> =] new NoteBook(<container> [,<name expC>])

<oRef>

A variable or property—typically of <container>—in which to store a reference to the newly created NoteBook object.

<container>

The container—typically a Form object—to which you’re binding the NoteBook object.

<name expC>

An optional name for the NoteBook object. If not specified, the NoteBook class will auto-generate a name for the object.

Properties

The following tables list the properties and events of interest in the NoteBook class. (No particular methods are associated with this class.)

Property

Default

Description

allowDrop

false

Whether dragged objects can be dropped on the NoteBook

anchor

0 – None

How the NoteBook object is anchored in its container (0=None, 1=Bottom, 2=Top, 3=Left, 4=Right, 5=Center, 6=Container)

baseClassName

NOTEBOOK

Identifies the object as an instance of the NoteBook class

buttons

false

Whether the notebook tabs appear as buttons instead

className

(NOTEBOOK)

Identifies the object as an instance of a custom class. When no custom class exists, defaults to baseClassName

colorNormal

BtnFace

Color of the notebook background

curSel

 

The number of the currently selected tab

dataSource

 

The tab names for the notebook

focus

Normal

When to give focus to the notebook tabs when they are clicked (0=Normal, 1=On Button Down, 2=Never)

multiple

false

Whether the notebook tabs are displayed in multiple rows, or in a single row with a scrollbar

visualStyle

Right Justify

The style of the notebook tabs (0=Right Justify, 1=Fixed Width, 2=Ragged Right)

 

Event

Parameters

Description

canSelChange

<nNewSel expN>

Before a different notebook tab is selected; return value determines if selection can leave the current tab.

onDragEnter

<left expN>
<top expN>
<type expC>
<name expC>

When the mouse enters the notebook display area during a Drag&Drop operation

onDragLeave

 

When the mouse leaves the notebook display area without having dropped an object

onDragOver

<left expN>
<top expN>
<type expC>
<name expC>

While the mouse drags an object over the notebook display area during a Drag&Drop operation

onDrop

<left expN>
<top expN>
<type expC>
<name expC>

When the mouse button is released over the notebook display area during a Drag&Drop operation

onSelChange

 

After a different notebook tab is selected

The following table lists the common properties, events, and methods of the NoteBook class:

Property

 

Event

 

Method

before
borderStyle

dragEffect

enabled

first

fontBold

fontItalic

fontName

fontSize

fontStrikeout

fontUnderline

form

height

helpFile

helpId

hWnd

id
left

mousePointer

name

pageno

parent

printable

speedTip

statusMessage

systemTheme

tabStop

top

visible

width

beforeRelease
onClose

onDesignOpen

onDragBegin

onGotFocus

onHelp

onLeftDblClick

onLeftMouseDown

onLeftMouseUp

onLostFocus

onMiddleDblClick

onMiddleMouseDown
onMiddleMouseUp

onMouseMove

onOpen

onRightDblClick

onRightMouseDown

onRightMouseUp

drag( )
move( )

release( )

setFocus( )

Description

The NoteBook object combines aspects of the Form, Container, and TabBox objects. It’s a multi-page control, like the Form; it acts as a container, and it has tabs, although they’re on top. Selecting a tab automatically changes the page of the notebook to display the controls assigned to that page. The notebook’s pageno property indicates which page of the form the notebook is in. The notebook’s curSel property indicates the current page the notebook is displaying.

When the Notebook's enabled property is set to "false", the enabled properties of all contained controls are likewise set to "false". When the Notebook's enabled property is set to "true", the enabled properties of the contained controls regain their individual settings.