Understanding Property Pages

 < Free Open Study > 



Many ActiveX controls also have associated property pages, which are hosted within a tabbed dialog box. It is important to note that property pages are COM objects, and expose standard COM interfaces (typically IPropertyPage) that allow the control and the dialog host to interact with them. These pages allow the user of the control to set the properties provided by the control at design time from a friendly tabbed dialog box. Although most environments provide alternative ways to set a control's state at design time, property pages provide a standard way to do so (after all, not all COM savvy environments have the equivalent of a VB Property Window). Figure 14-4 shows the set of property pages used by the MS Calendar control:

click to expand
Figure 14-4: Property pages for the MS Calendar control.

As you can see, three pages are provided for this particular ActiveX object. The General tab is a custom property page, which allows us to set properties unique to the Calendar coclass. The Font and Color tabs provide access to standard pages, which are commonly used by many ActiveX controls. A given control may have any number of custom and standard property pages, which will vary based on the complexity of your object's property set.



 < Free Open Study > 



Developer's Workshop to COM and ATL 3.0
Developers Workshop to COM and ATL 3.0
ISBN: 1556227043
EAN: 2147483647
Year: 2000
Pages: 171

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net