Introducing Property Sheets
One of the newest types of graphical objects is the tabbed dialog box, also known as aproperty sheet. A property sheet is a dialog box with two or more pages. Windows and NT
are loaded with property sheets, which organize the many options that users can modify.
You flip the pages by clicking labeled tabs at the top of the dialog box. Using such
dialog boxes to organize complex groups of options enables users to more easily find the
information and settings they need. As you've probably guessed, Visual C++ 6 supports
property sheets, with the classes CPropertySheet and CPropertyPage.
Similar to property sheets are wizards, which use buttons instead of tabs to move from
one page to another. You've seen a lot of wizards, too. These special types of dialog
boxes guide users step by step through complicated processes. For example, when you use
AppWizard to generate source code for a new project, the wizard guides you through
the entire process. To control the wizard, you click buttons labeled Back, Next, and
Finish.
Finding a sample property sheet is as easy as finding sand at the beach. Just click
virtually any Properties command or bring up an Options dialog in most applications. For
example, Figure 12.1 shows the dialog box that you see when you choose Tools, Options
from within Visual C++. This property sheet contains 12 pages in all, each covering a
different set of options.
FIG. 12.1 The Options properties sheet contains many tabbed pages.
NOTE: Many people forget the difference between a property sheet and a
property page. A property sheet is a window that contains property pages.
Property pages are windows that hold controls. They appear on the property
sheet.
As you can see, property sheets are a great way to organize many types of related
options. Gone are the days of dialog boxes so jam-packed with options that you needed a
college-level course just to figure them out. In the following sections, you'll learn to
program your own tabbed property sheets by using MFC's CPropertySheet and
CPropertyPage classes.
No comments:
Post a Comment