Categories |
Post Reply |
Author | |
vbuser
Newbie Joined: 22 January 2004 Status: Offline Points: 39 |
Post Options
Thanks(0)
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! |
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
Yes, you will need to use the FindItem method to reference the category you want to add items to.
|
|
vbuser
Newbie Joined: 22 January 2004 Status: Offline Points: 39 |
Post Options
Thanks(0)
|
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!
|
|
SuperMario
Admin Group Joined: 14 February 2004 Status: Offline Points: 18057 |
Post Options
Thanks(0)
|
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 |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |