Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Property Grid
  New Posts New Posts RSS Feed - Categories
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Categories

 Post Reply Post Reply
Author
Message
vbuser View Drop Down
Newbie
Newbie


Joined: 22 January 2004
Status: Offline
Points: 39
Post Options Post Options   Thanks (0) Thanks(0)   Quote vbuser Quote  Post ReplyReply Direct Link To This Post Topic: Categories
    Posted: 03 June 2004 at 1:59am

How can I add items and ADD or USE categories previously added into the control? My application adds Field names from a table, these field names must be loaded to the correct category section of the property grid, the first 3 fields may need to go to CATEGORY A, the next, CATEGORY B, and the next field may need to go to CATEGORY A - If I add the category on every item, (set Category = wndPropertyGrid.AddCategory("Category") I get DUPLICATE categories... How can I accomplish this? Keep in mind that I don't really know how many categories will be loaded into the control until every item is added and analyzed. May be using wndPropertyGrid.FindItem.....????? Thank you! 

Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 03 June 2004 at 6:43am
Yes, you will need to use the FindItem method to reference the category you want to add items to.
Back to Top
vbuser View Drop Down
Newbie
Newbie


Joined: 22 January 2004
Status: Offline
Points: 39
Post Options Post Options   Thanks (0) Thanks(0)   Quote vbuser Quote  Post ReplyReply Direct Link To This Post Posted: 04 June 2004 at 12:54am
Can you please provide an example in how to look for the category, then assign the object so that more items can be added to the matching category... I've tried in many ways and looked at the available help - As usual the HELP on ALL of these components is BAD - Gives only internal references and NO REAL world examples in how to implement it. Thank you!
Back to Top
SuperMario View Drop Down
Admin Group
Admin Group
Avatar

Joined: 14 February 2004
Status: Offline
Points: 18057
Post Options Post Options   Thanks (0) Thanks(0)   Quote SuperMario Quote  Post ReplyReply Direct Link To This Post Posted: 04 June 2004 at 6:42am
Ok, say you add 2 categories, "Application" and "Project," now you want to find the "Application" category so you can add more items.  Try something like this:

    Dim Category As PropertyGridItem
    
    Set Category = wndPropertyGrid.AddCategory("Application")
    Category.AddChildItemBinded PropertyItemString, Me, "Namespace"
    Category.AddChildItemBinded PropertyItemString, Me, "Startup Object"
   
    Set Category = wndPropertyGrid.AddCategory("Project")
    Category.AddChildItemBinded PropertyItemString, Me, "Application Icon"
   
    Set Category = wndPropertyGrid.FindItem("Application")
    If Not Category Is Nothing Then
        Category.AddChildItemBinded PropertyItemString, Me, "Project File"
        Category.AddChildItemBinded PropertyItemString, Me, "Project Folder"
    End If


Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.125 seconds.