Mircea Ispas
Mircea Ispas

Reputation: 20780

CMFCPropertyGridCtrl add editable string property

I derived a class from CMFCPropertyGridCtrl to add a simple interface for my needs. I want to add a new string value so I can edit it:

void CPropertyGrid::AddString(const char* tag, const char* defaultValue)
{
    COleVariant valueType(defaultValue);
    CMFCPropertyGridProperty *stringProperty = new CMFCPropertyGridProperty(tag, valueType);
    stringProperty->AllowEdit(TRUE);
    AddProperty(stringProperty);
}

This adds a new string in the property grid, but I can't edit it. Is there another way to make this editable?

Thanks!

Upvotes: 1

Views: 2542

Answers (1)

Mircea Ispas
Mircea Ispas

Reputation: 20780

Notify value must be set to true to be able to edit values.


Screen shot:

enter image description here

Upvotes: 4

Related Questions