I'm adding properties to an object of type CMFCPropertyGridCtrl
like this:
myPropertyListCtrl.AddProperty(
new CMFCPropertyGridProperty(
_T("Name"),
foo.GetName())
);
The result is that only the second column is visible but not the first that should contain "Name".
CMFCPropertyGridCtrl::GetPropertyColumnWidth()
but there appears to be no corresponding Set...
method...NewControls
sample, in which the column sizing appears to be fully automatic. However, I couldn't find the relevant difference to my code.What am I missing?
m_nLeftColumnWidth
responsible for holding the "Name" column's width is a protected
member of the CMFCPropertyGridCtrl
class. Create your own class, that derives from CMFCPropertyGridCtrl
and you will be able to manipulate m_nLeftColumnWidth
.