The PropertySheet class provides methods to control a property sheet. It is a subclass of the CategoryDialog class (see CategoryDialog Class). A property sheet is similar to a category dialog that spreads its dialog items over several pages (categories), where the individual pages are controlled by a tab control instead of radio buttons or combo box lists.
Refer to PROPDEMO.REX in the OODIALOG\SAMPLES directory for an example.
The PropertySheet class requires the class definition file oodwin32.cls:
::requires "oodwin32.cls"
Use an object of the DialogControl class or one of its subclasses to work with an individual dialog item of the sheets. To retrieve such an object, you can call one of the following methods depending on the requested control:
+-10---+ >>-aPropertySheet~Init(--+----------+--,--+----------+--,--+------+--,--> +-DlgData.-+ +-cattable-+ +-tabx-+ +-4----+ >--+------+--,--+-------+--,--+-------+---)---------------------------->< +-taby-+ +-style-+ +-hFile-+
The Init method is called when a new instance of the PropertySheet class is created and initializes the property sheet object.
The arguments are:
An optional stem variable containing the initial values for some or all dialog items. If the dialog is terminated with the OK button, the values in the data fields of the dialog are copied to this variable. The ID of the dialog items is used to name the entry within the stem.
You can use this argument to set the category names, separated by blanks. Your class, which is a subclass of PropertySheet, must provide a method for each of the categories in the string to define the dialog items of the related category page. The name of the method is equal to the category name in the string.
If you omit this argument, set the category names to the catalog directory in the InitCategories method (see InitCategories).
The position of the tab control that is used to select the category. The default is 10,4.
Determines the style of the property sheet and the tab control used to select the visible category. The style must be specified as a text string that can contain tab control options (see AddTabControl) or the option WIZARD, which adds a backward and a forward button with ID 11 and 12 to the dialog to switch between the category pages.
The file name of a header file containing symbolic ID defines for resources.
The following example creates a property sheet dialog with 4 sheets:
dlg = MyProperty~new(MyData.,"Movies Cinemas Days Ticket", , ,"WIZARD") dlg~createCenter(200,180,"Let's go to the movies") dlg~execute("SHOWTOP") . . . ::class MyProperty subclass PropertySheet ::method Movies /* define the Movies page */ ::method Cinemas /* define the Cinemas page */ . . .
An additional example can be found under the Init method, in the BaseDialog section. This example shows the use of the dialog data stem and header file arguments in more detail.