Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. 891011 - nested groups in a property grid

891011 - nested groups in a property grid

Scheduled Pinned Locked Moved C / C++ / MFC
questioncssworkspace
1 Posts 1 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • I Offline
    I Offline
    ilostmyid2
    wrote on last edited by
    #1

    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

    1 Reply Last reply
    0
    Reply
    • Reply as topic
    Log in to reply
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes


    • Login

    • Don't have an account? Register

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • World
    • Users
    • Groups