Is it possible to hide a property on a vision component based on a condition?
I know I can use the HIDDEN_MASK
in the BeanInfo class, but that hides the property permanently.
No. The only filtering available is static based on the "mask level" (expert/standard/basic) and that concept is planned to be removed in 8.3 anyways.
Can't I fire this somehow to change the Mask as required?
findProperty("property").setHidden(variable);
There's only one bean for the entire designer. There isn't a separate one for every component instance placed on a window or template.
I see. That helps, thanks guys.
Consider converting your component into an abstract class and making two "versions", each locked to the corresponding condition. The subclasses would be concrete and could have their own beans.
That sounds like a lot of work for what it's worth. I was just hoping to clean up the property editor a bit, since there are quite a few properties that are only useful if another property is set to true. And there are multiple sets like that.
For example:
Properties 1 & 2 are only useful if property 10 is true.
Properties 3 & 4 are only useful if property 11 is true.
So if properties 10 & 11 are false, then may as well hide properties 1-4.
If you look at IA's own EasyChart, you find a bunch of properties that only apply in realtime vs. historical vs. manual mode. They're all in the designer.
Yeah, there are a lot of properties in that EasyChart. My component only has a third of that, so I'll stop whining, Haha