438 views
in GUI Development by

Hello,

I want to InvalidateStateView() of the Owner Dialog of the present topmost dialog.

for example :

Owner.PresentDialog( new  aDialog, null, null, null, null, null, false );

/*** do things **/

Owner.InvalidateViewState(); // is it referring to the dialog where the present dialog was called right?

Owner.DismissDialog( this, null, null, null, null, null, false );

 

1 Answer

0 votes
by

Hello Riccardo,

Owner.InvalidateViewState(); // is it referring to the dialog where the present dialog was called right?

Owner refers the owner component, the asking component X is actually displayed inside. This is not necessarily the dialog which triggered the PresentDialog( X, .... ) operation.

Well, I'm not sure whether that answers your question. If not, please explain more in detail the relation between the dialogs or components. See also the section Enumerate and search views existing within the component and Enumerate and search for existing Dialogs. Maybe the methods described there provide the desired functionality to find the dialog (= component, = view).

For example, assuming a component X is acting as dialog and you want to access the dialog, which was active in the same Owner just before X was presented, then following could work:

// 'this' represents the actual component X

var int32       index      = Owner.GetIndexOfDialog( this );
var Core::Group prevDialog = Owner.GetDialogAtIndex( index + 1 );

// or, if 'this' dialog is actually the 'active' dialog within Owner:

var Core::Group prevDialog = Owner.GetDialogAtIndex( 1 );

I hope it helps you further.

Best regards

Paul Banach

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

...