By themselves, notebook widgets do not offer much of an interface to users. To present a useful interface to users, notebooks must contain pages (EwPage). Pages are created by sending one of the following messages to either a PM or WIN notebook:
The following expression adds a page with a tab labeled "Top Page" to a notebook:
topPage := notebook createPage: 'envinfo_page' argBlock: [:w | "Note: The tab label can be any renderable." w tabLabel: 'Top Page']. topPage manageChild.
Use createPage:argBlock:sharingWith: if many pages of a notebook are to display different information in the same way; that is, each page will contain the same widgets but with different information (for example, an address book). This will save both the number of widgets needed and the speed of opening a notebook.
Tip: | Pages only appear in the notebook if they are managed. To temporarily hide a page in a notebook without destroying the page widget, use the unmanageChild message. |