891011 - nested groups in a property grid
-
hi how can i have nested groups in a CPropertyGridCtrl without increasing indent? let me depict what i'm going to do. i've a ready program with the following output: original[^] i tried to create the same output with the following code:
void AcItemPropertyPane::pr_appendLinkProp(CMFCPropertyGridProperty *pGroup, const AsLink &link)
{
CMFCPropertyGridProperty* pGroup2 = new CMFCPropertyGridProperty("Coordinate for Goto", 0, TRUE);
CMFCPropertyGridProperty* pProp = new CMFCPropertyGridProperty("Address X", (_variant_t) link.col, " ");
pProp->EnableSpinControl(TRUE, 0, 99);
pGroup2->AddSubItem(pProp);
pProp = new CMFCPropertyGridProperty("Address Y", (_variant_t) link.row, " ");
pProp->EnableSpinControl(TRUE, 0, 9);
pGroup2->AddSubItem(pProp);
pGroup->AddSubItem(pGroup2);
pProp = new CMFCPropertyGridColorProperty("Color of Goto Route", (_variant_t) link.color, NULL, "Goto line color change");
pGroup->AddSubItem(pProp);
}void AcItemPropertyPane::pr_initADSensorPropList(const AsItemSpec &is)
{
d_wndPropList.RemoveAll();
CMFCPropertyGridProperty *pGroup = new CMFCPropertyGridProperty("AD Setup");
CMFCPropertyGridProperty *pProp = new CMFCPropertyGridProperty("A/D port", " ", "A/D port setup");
pGroup->AddSubItem(pProp);
pGroup->AddSubItem(pr_newFuncProp(is.func));
pProp = new CMFCPropertyGridProperty("Compare variable/value", " ", "When jump is compare to Input value (0-255).");
pGroup->AddSubItem(pProp);
pr_appendLinkProp(pGroup, is.link);
d_wndPropList.AddProperty(pGroup);
}(pr_initADSensorPropList is called). but it resulted in the following output: mine[^] there's also a difference in the original color property and mine. also separator in coordinate differ (; with ,) how can i make mine appear the same as the original one? thank u