The following tasks are associated with using an INotebook*
part in visual composition. Tasks that are common to many parts
are described in related topics.
-
- Selecting PM compatibility
- You can define either a notebook that is native to the
system or one that is compatible with the OS/2
Presentation Manager (PM) notebook. The following
characteristics of a PM-compatible notebook are not
applicable for a native Windows notebook:
- Choice of notebook orientation
- Choice of notebook binding
- Customizable tab shape and size
- Minor tabs, distinct from standard major tabs
- A status area
To provide a PM-compatible notebook, open the style
property in the INotebook* property sheet and set the pmCompatible
style to on.
- Selecting notebook orientation
- For a PM-compatible notebook, you can specify the
notebook orientation. The orientation determines where
each of the following appear:
- The edges of the pages behind the open page
- The major tabs
To define the orientation, set the orientation
property in the INotebook* property sheet. With the <default>
value, the back page edges are below and right of the top
page, and major tabs are on the right. Alternatively,
select one of the following choices in the value column:
- backpagesBottomTabsLeft
- backpagesBottomTabsRight
- backpagesLeftTabsBottom
- backpagesLeftTabsTop
- backpagesRightTabsBottom
- backpagesRightTabsTop
- backpagesTopTabsLeft
- backpagesTopTabsRight
- Selecting notebook binding
- For a PM-compatible notebook, you can specify the
notebook binding. The binding is cosmetic, and serves no
functional purpose. To define the binding for the
notebook, set the binding property in the
INotebook* property sheet. With the <default>
value, the binding is solid. Alternatively, select one of
the following choices in the value column:
- Customizing page tabs
- For a PM-compatible notebook, you can customize page
tabs. To define tab appearance for the notebook, set the
following properties in the INotebook* property sheet:
- tabShape
- The shape of tab corners. With the <default>
value, the corners are square. Alternatively,
select one of the following choices in the value
column:
- tabTextAlignment
- The alignment of text on the tabs. With the <default>
value, text is centered. Alternatively, select
one of the following choices in the value column:
- Major tab size
- The dimensions of major tabs.
- Minor tab size
- The dimensions of minor tabs. If you do not
intend to use minor tabs, set the minor tab width
and height to 0. With no minor tabs specified,
window space is not reserved for minor tabs.
- Aligning status text
- For a PM-compatible notebook, you can specify status text
alignment. To align the status text at the bottom of each
notebook page, set the statusTextAlignment
property in the INotebook* property sheet. With the <default>
value, text is left-aligned. Alternatively, select one of
the following choices in the value column:
- Adding a page
- To add a page to the notebook, select an add page choice
in the pop-up menu of either the INotebook* part or an
IVBNotebookPage* part.
- To add a page to an empty notebook, select Add
initial page in the INotebook* pop-up menu.
The Add initial page choice is replaced by
Add page in the pop-up menu.
- To add a page before or after the top page of a
notebook, select Add page in the
INotebook* pop-up menu. In the submenu, select Before
top page or After top page.
- To add a page before or after an existing page,
select Add page in the IVBNotebookPage*
pop-up menu. In the submenu, select Before
or After.
- To move a page from another notebook, drag the
page and drop it on the target INotebook* part.
An IVBNotebookPage* part is placed in the notebook.
- Adding pages dynamically
- To add dynamically created notebook pages, use an add
page action. For example, to add a page at the back of
the notebook every time a related event occurs, do the
following:
- Define a primary part for each page, based on a
composer part such as an IMultiCellCanvas*. For
this discussion, we will call it MyPagePart.
- Add a Factory part and a Variable part, and
change their type to MyPagePart*.
- Connect the related event to the new
action of the MyPagePart* factory.
- Connect the newEvent feature of the
MyPagePart* factory to the this attribute
of the MyPagePart* variable.
- Connect the newEvent feature of the
MyPagePart* factory to the addLastPage
action of the INotebook* part.
- Connect the this attribute of the
MyPagePart* variable to the pageWindow
parameter of the newEvent-to-addLastPage
connection.
- Connect a text attribute for tab text to the pageInfo
parameter of the newEvent-to-addLastPage
connection.
Common Tasks for Control Parts
Setting Part Style Properties
Setting Part Color Properties
Setting Part Font Properties
Setting Part Handlers
Properties
Setting Part Framing Properties
Working with VisualAge User
Interface Parts
INotebook
Property Settings --
INotebook
Portability -- INotebook