Property value

Professional User Interface Suite, Copyright FOSS Software Inc. Help Published with Permission.

The CExtPropertyValue class implements the property value in the hierarchical list of data. Visually, the property value is divided into the left part, which shows the property value name, and the right part, which displays the value itself and allows the user to edit the value.

CExtPropertyValue is inherited from CExtPropertyItem and additionally provides the functionality specific to property values. It keeps two CExtGridCell objects corresponding to active and default values of the property. Storing these two values allows the user to reset the active value to the default one by clicking the Reset item in the context menu that is invoked over the name part of the property value.

CExtGridCell is a base class for the number of cell classes implementing particular cell types, which can be used for property values:

   Grid cell class    Cell type
   CExtGridCellBool    Boolean values
   CExtGridCellCheckBox    Check box control
   CExtGridCellColor    Color selection control
   CExtGridCellComboBox    Combo box control
   CExtGridCellDateTime    Date/time selection control
   CExtGridCellDropListComboBox    Combo box control without in-place activated edit; left button clicking on any cell area shows a pop-up list box window
   CExtGridCellFile    File selection control
   CExtGridCellFileImage    Icon selection control
   CExtGridCellFolder    Folder selection control
   CExtGridCellFont    Font selection control
   CExtGridCellFontFaceName    Font name only selection control
   CExtGridCellHyperLink    Hyperlink control
   CExtGridCellIPAddress    IP address control
   CExtGridCellPassword    Password control
   CExtGridCellRadioButton    Radio button control
   CExtGridCellString    Edit control
   CExtGridCellUpDown    Up-down control for numeric values
   CExtGridCellUpDownColorPart    Up-down control for the red, green or blue color attribute
   CExtGridCellUpDownFontWeight    Up-down control for the font weight attribute
   CExtGridCellUpDownRectPart    Up-down control for rectangle attributes
   CExtGridCellVariant    Universal cell type that can be use for storing and editing data of different types

Typically you create a CExtPropertyValue-derived class in which you store a pointer to the bound object (whose properties are displayed and set up with the property grid), specify the value name, create a grid cell of the required type in the constructor, and implement the Apply() method that should do some specific action related to the bound object.