You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I added a toolbar option that allows the player to toggle read-only functionality. That is to say, while in Read-Only mode, the user cannot edit the property grid, trees, lists, etc. But while not in Read-Only mode, the user can has access to the aforementioned functionality.
That said, if AttributePropertyDescriptor uses a custom editor then it remains in the default Read-Only state. I extended CustomTypeDescriptorNodeAdapter where the properties are not cacheable, but the problem remains. Any suggestions how to resolve this issue?
The text was updated successfully, but these errors were encountered:
A simpler approach is to create a DomNodeAdapter and register it at root node.
Then have the DomNodeAdapter to monitor all changes and when the Read-only mode is on reject the changes by throwing InvalidTransactionException().
For reference take a look at public class CurveLimitValidator : DomNodeAdapter in DomTreeEditor sample.
Also take a look at DomValidators.
That may work but that seems contrary to ATF's behavior. That's the equivalent of the Cut, Copy, Paste, Delete buttons always enabled and then a dialog appears if you try to before an invalid action. If the action is invalid, then those buttons are disabled.
Another option is to implement ICommandClient and IInitializable in your editor or form. This will ensure that CanDoCommand(object commandTag) , DoCommand(object commandTag), and UpdateCommand(object commandTag) will be called when the user interface is rendered.
By adding custom logic in those methods, the return value can be set to true or false for any command based on the current state of your IDocument or application.
I added a toolbar option that allows the player to toggle read-only functionality. That is to say, while in Read-Only mode, the user cannot edit the property grid, trees, lists, etc. But while not in Read-Only mode, the user can has access to the aforementioned functionality.
That said, if AttributePropertyDescriptor uses a custom editor then it remains in the default Read-Only state. I extended CustomTypeDescriptorNodeAdapter where the properties are not cacheable, but the problem remains. Any suggestions how to resolve this issue?
The text was updated successfully, but these errors were encountered: