<< Return to Main Index

< Return to Class Index

class CGXProperties: public CObject

The CGXProperties class maintains display and print properties of a grid, such as margins, header/footer and colors of grid lines. Objective Grid offers some predefined dialog classes which allow the end user to modify these settings at run time. All settings except header/footers can be written to the profile and loaded from it. Furthermore, CGXProperties supports serialization.

When a grid is initialized, it checks (in OnGridInitialUpdate) if there is an existing property object. If this is not the case, a property-object will be created, and default data will be loaded from the profile. The property-object is maintained by the parameter-object. The CGXGridParam class owns a pointer to a property-object and provides accessor methods (GetProperties / SetProperties).

If you want data for the property-object stored in an extra profile section, you should call SetSection before data are loaded from the profile. See the description of SetSection for further details.

CGXProperties maintains a header/footer for printing a grid view. The end user can use some tokens when specifying the header/footer at runtime. For example, “$d” will be replaced with the current date. If you want to provide more tokens for the end user, you should subclass CGXProperties and override the SubstTokenText method. See this method for further details.

The CGXProperties class supports user-defined properties. The programmer can add properties at run time and change their settings. These user-defined properties can also be modified by the end user through the CGXDisplayPropertiesDialog dialog. User properties can be serialized and written to profile as any other attribute of CGXProperties.

Other predefined dialogs in Objective Grid allow the end user to change the header/footer (CGXHeaderFooterDialog) and page print settings (CGXPrintPropertiesDialog).

#include <gxall.h>

See Also

CGXGridParam::GetProperties CGXGridParam::SetProperties CGXProperties::SetSection CGXProperties::SubstTokenText CGXDisplayPropertiesDialog CGXHeaderFooterDialog CGXPrintPropertiesDialog

CGXProperties

Class Members