Original Post
I'm trying to bind a class to a PropertyGrid control so that I can change its attributes. Specifically, I'm making a simple particle system editor. I have the class bound to the control and all the properties are showing up. The problem is that only the properties defined as String are enabled, the other properties are greyed out and read-only. Here's the code for the class: Also, the boolean property doesn't produce a drop-down control in the PropertyGrid. I'm very new to managed code and .net, so it's probably something really stupid, so I'd appreciate a fresh pair of eyes!
public ref class cParticleDef
{
private:
String^ fEmissionRate;
Boolean^ bCanStretch;
public:
[Category("Configuration")]
[Description("Rate of emission")]
property String^ EmissionRate
{
String ^ get() { return fEmissionRate; }
void set(String ^ value)
{
fEmissionRate = value;
}
};
[Category("Appearance")]
[Description("Sets whether the particles can stretch along velocity vector")]
property Boolean^ CanStretch
{
Boolean ^ get() { return bCanStretch; }
void set(Boolean ^ value)
{
bCanStretch = value;
}
};
};