Using custom graphics while command inputs are not valid

Using custom graphics while command inputs are not valid

nnikbin
Collaborator Collaborator
365 Views
2 Replies
Message 1 of 3

Using custom graphics while command inputs are not valid

nnikbin
Collaborator
Collaborator

It seems that when ValidateInputsEventHandler determines that the inputs are not valid (using ValidateInputsEventArgs.areInputsValid Property), it not only disables the OK button, but also prevents the firing of ExecutePreview event handler. With that in mind, is there any method to use custom graphics when inputs are invalid and ExecutePreview event handler is disabled? For example use custom graphics to graphically show the user why inputs are not valid.

 

I thought instead of setting areInputsValid to false we can set Command.isOKButtonVisible to false to prevent execution of command, but it seems it is not possible to set isButtonVisible property outside CommandCreatedEventHandler.notify Method.

0 Likes
366 Views
2 Replies
Replies (2)
Message 2 of 3

nnikbin
Collaborator
Collaborator

I found that I can use custom graphics in other parts of the program like in ValidateInputsEventHandler, but they remain on screen and I should delete them when I do not need them. Is it a good practice or we should only use them in ExecutePreview event handler?

0 Likes
Message 3 of 3

kandennti
Mentor
Mentor

Hi @nnikbin .

 

I don't think there is any limit to where I can use it.