Hinweis
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, sich anzumelden oder das Verzeichnis zu wechseln.
Für den Zugriff auf diese Seite ist eine Autorisierung erforderlich. Sie können versuchen, das Verzeichnis zu wechseln.
A CMFCPropertyGridProperty object represents a list item in a property list control.
class CMFCPropertyGridProperty : public CObject
Members
Public Constructors
Name |
Description |
|---|---|
Constructs a CMFCPropertyGridProperty object. |
|
CMFCPropertyGridProperty::~CMFCPropertyGridProperty |
Destructor. |
Public Methods
Name |
Description |
|---|---|
Adds a new list item to a property list control. |
|
Adds a child item to a property. |
|
Called by the parent property list control to tell a property to resize the bounding rectangle of an embedded button. |
|
Retrieves the boundaries of the text box and optional spin button control that are used to set a property value. |
|
Makes a property either editable or read-only. |
|
Called by the framework to create an editable control for a property. |
|
Called by the framework to create an editable spin button control. |
|
Enables or disables a property. |
|
Enables or disables a spin button control that is used to modify a property value. |
|
Expands or collapses a property that contains sub-properties. |
|
Formats the text representation of a property value. |
|
Retrieves a DWORD value that is associated with a property. |
|
Retrieves a property description. |
|
Retrieves the number of expanded sub-items. |
|
Retrieves the zero-based index of the property's hierarchy level. |
|
Retrieves the name of the property. |
|
Called by the framework to display the name of the property in a tooltip. |
|
Retrieves the text of the option that is specified by an index. |
|
Retrieves the number of options that belong to a property. |
|
Retrieves the initial value of the current property. |
|
Retrieves a pointer to a parent property. |
|
Retrieves the bounding rectangle of a property. |
|
Retrieves a sub-property identified by a zero-based index. |
|
Retrieves the number of sub-items. |
|
CMFCPropertyGridProperty::GetThisClass |
Used by the framework to obtain a pointer to the CRuntimeClass object that is associated with this class type. |
Retrieves a property value. |
|
Called by the framework to retrieve the text representation of the property value that is then displayed in a tooltip. |
|
Points to the property object that corresponds to the property list item that corresponds to a point. |
|
Indicates whether a property is editable. |
|
Indicates whether a property is enabled or disabled. |
|
Indicates whether a property is expanded or collapsed. |
|
Indicates whether the current property represents a group. |
|
Indicates whether the current property is editable. |
|
Indicates whether the current property is modified. |
|
Indicates whether the parents of the current property are expanded. |
|
Indicates whether the current property is selected. |
|
Indicates whether the current property is visible. |
|
Called by the framework when the user clicks a button that is contained in a property. |
|
Called by a parent property list control when a user clicks the name field of a property. |
|
Called by a parent property list control when a user clicks the value field of a property. |
|
Called by the framework when a combo box that is contained in a property is closed. |
|
Called by the framework when the user double clicks a property. |
|
Called by the framework to draw a button that is contained in a property. |
|
Called by the framework to display the property description. |
|
Called by the framework to draw an expand box control near a property that contains sub-properties. |
|
Called by the framework to display the property name. |
|
Called by the framework to display the property value. |
|
Called by the framework when the user is about to modify a property value. |
|
Called by the framework when the user is finished modifying a property value. |
|
|
|
|
|
Called by the framework when the user clicks the right mouse button in the property name area. |
|
Called by the framework when the user clicks the right mouse button in the property value area. |
|
Called by the framework when the user selects an item from the editable combo box. |
|
Called by the framework when the mouse pointer moves to a property item. |
|
|
|
Called by the framework when the value of an editable property has changed. |
|
Called from the property list control when the property is selected and the user enters a new character. |
|
Redraws the property. |
|
Removes all options (items) from a property. |
|
Removes the specified sub-item. |
|
Restores the original value of an edited property. |
|
Associates a DWORD value with a property. |
|
Specifies the text that describes the current property. |
|
Sets the name of a property. |
|
Sets the original value of an editable property. |
|
Sets the value of a property grid property. |
|
Shows or hides a property. |
Protected Methods
Name |
Description |
|---|---|
Called by the framework to add a combo box to a property. |
|
Indicates whether a property contains a button. |
|
Called by the framework to initialize a property object. |
|
Indicates whether the specified property is a sub-item of the current property. |
|
Indicates whether the value of the current property has changed. |
|
Called by the framework when it must retrieve a brush to fill the background color of a property. |
|
Called by the framework when a property is destroyed or when editing is finished. |
|
Called by the framework when the property loses the input focus. |
Data Members
Name |
Description |
|---|---|
Format string for a value of type double. |
|
Format string for a value of type float. |
|
Format string for a value of type long. |
|
Format string for a value of type short. |
Remarks
Use a CMFCPropertyGridProperty object to represent a property, which you then add to a property list control. For more information, see CMFCPropertyGridCtrl Class.
A property object can represent data types such as strings, dates, and Boolean or integer values. It can contain child properties, or it can contain a control such as a combo box or a button control.
Example
The following example demonstrates how to construct a CMFCPropertyGridProperty object. The example also demonstrates how to use various methods in the CMFCPropertyGridProperty class to add an option, add a sub-item, enable a property, and show a property. This example is part of the New Controls sample.
CMFCPropertyGridProperty* pGroup1 = new CMFCPropertyGridProperty(_T("Appearance"));
// construct a COleVariant object.
COleVariant var3DLook((short)VARIANT_FALSE, VT_BOOL);
pGroup1->AddSubItem(new CMFCPropertyGridProperty(_T("3D Look"), var3DLook,
_T("Specifies the dialog's font will be nonbold and controls will have a 3D border")));
CMFCPropertyGridProperty* pProp = new CMFCPropertyGridProperty(_T("Border"),
_T("Dialog Frame"), _T("One of: None, Thin, Resizable, or Dialog Frame"));
pProp->AddOption(_T("None"));
pProp->AddOption(_T("Thin"));
pProp->AddOption(_T("Resizable"));
pProp->AddOption(_T("Dialog Frame"));
pProp->AllowEdit(FALSE);
pGroup1->AddSubItem(pProp);
pGroup1->AddSubItem(new CMFCPropertyGridProperty(_T("Caption"), (COleVariant) _T("About NewControlsDemo"), _T("Specifies the text that will be displayed in the dialog's title bar")));
pGroup1->AdjustButtonRect();
pGroup1->AllowEdit();
pGroup1->Enable();
pGroup1->Show();
pGroup1->Redraw();
Inheritance Hierarchy
Requirements
Header: afxpropertygridctrl.h