Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
The TabPage class is used to represent an individual tab page that will appear on the TabControl. It has functionality to set the visual characteristics the page should have as well as methods to ensure that any changes to the data displayed are processed correctly. and Figure 19-9 lists the code required.
|
Code View:
Scroll
/
Show All
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|| File: TabPage.scurl
|| Author: Paul Sheehan
|| Version: 1.0
|| Contents: Ancestor class that represents a page
|| presented in a tab control.
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
{define-class abstract public TabPage {inherits TabPane}
field protected tab-label:#String
field protected tab-contents:#Graphic
field protected gui-factory:GUIFactory = {GUIFactory}
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
|| Method: constructor (default)
|| Purpose: Instantiates the class with the default
|| characteristics
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
{constructor public {default ...}
{self.initialize}
{construct-super
label=self.tab-label,
self.tab-contents,
...}
}
}
|