Jump to content
  • Advertisement
Sign in to follow this  
Plerion

[C++/CLI] Issues with PropertyGrid

This topic is 2836 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hello there!

Im using a propertygrid to display changeable (and not changeable) properties of various objects. Now ive run into problems when id like to display properties of an object which is a member of my main object. Those objects are all grayed out like read-only properties (but are not!). Here is an image:

The code is

...

property PRMTFLayer^ TestLayer;
property array<PRMTFLayer^>^ TestLayerArray;
...



-> http://imagr.eu/up/4d726d12114341_p1.jpg

As you can see TestLayer is grayed out even it has its own properties and is not read-only. TestLayerArray on the other hand is bold and can be opened and edited.

My first thought was that it might be an error with the properties of PRMTFLayer but thats not the problem because if i attempt to edit TestLayerArray i get the following view:
http://imagr.eu/up/4d726d75188d63_p2.jpg

Here all the properties are displayed correctly.

And even worse if i change my class and add a TextBox to the properties it also works, as shown here:
http://imagr.eu/up/4d726dcc5b3634_p3.jpg

Thats actually the behavior id like to have from the PRMTFLayer. But why ain't that working? Does the object have to have any special properties to be displayed like the textbox is?


Greetings and thanks
Plerion


Share this post


Link to post
Share on other sites
Advertisement
After digging a lot through google ive found that article:
http://msdn.microsoft.com/en-us/library/aa302326.aspx

Basically adding [TypeConverter(ExpandableObjectConverter::typeid)] to the class helps enabling the editing and implementing a class that inherits from ExpandableObjectConverter would also allow to provide even further customization of the entry inside the propertygrid.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!