403 views
in GUI Development by
Hello,

Is there a way to InvalidateViewState() of a Dialog after Dismissing a dialog presented ontop of the original one?

I was thinking about overriding the method Done() in the dialog i dissmissed  including Owner.InvalidateViewState() in it, so the underlaing dialog gets updated?

Thanks.

1 Answer

+1 vote
by
 
Best answer

Hello Riccardo,

the Done() method is not allowed to access foreign objects. Therefore this approach will not work.

Anyway, whether a component actually acts as dialog or not, is reflected in the Dialog state of this component (See also Handle the view state of the Dialog). This state changes when the component is presented and it changes again when the component is dismissed. You could thus implement in the corresponding component the method UpdateViewState() and react there on the alternation of the Dialog state. This could include the invocation of Owner.InvalidateViewState().

Please note, Owner may become null. Therefore add if-condition to test whether Owner is valid before invoking InvalidateViewState().

I hope it helps you further.

Best regards

Paul Banach

by
Thanks Paul. I'll try this approach.

Ask Embedded Wizard - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...