364 views
in GUI Development by
Hi,

I have implemented a screen with Core::Group  this screen's visibility is controlled by SwitchToDialog call.

Is there a way by which  I can determine inside the screen that the screen's visibility is changed (is it visible or invisible) ?

According to the visibility I am planning to call some internal functions.

Thanks,

Prasanth

2 Answers

0 votes
by

Hi Prasanth,

you can implement your own UpdateViewState() method and evaluate the parameter aState. Each time the visibility of the view changes, the method is called and you can determine the current visibility by:

var bool visible = aState.contains( Core::ViewState[ Visible ]);

Does this answer your question?

Best regards,

Manfred.

 

by
Hi Manfred,Paul

For my case it was  easy to reuse the UpdateViewState I have done an implementation with  UpdateViewState.

Thanks,

Prasanth
0 votes
by

Hello Prasanth,

the evaluation of the visibility state is not very trustful. In practice, a GUI component can become invisible even if its visibility state is true. This may be affected by the visibility state of the superior GUI component or any other property affecting the opacity of the object. Also, if the visibility of a superior GUI component changes, the nested components are not notified about this alternation. The method UpdateViewState() is invoked only, when the visibility changes directly in the corresponding component.

If your intention is to perform operations when SwitchToDialog() operation is finished, see the both parameters aComplete and aCancel of the method SwitchToDialog().  See also the section Handle the completion of a Dialog transition.

Best regards

Paul Banach

Ask Embedded Wizard

Welcome to the question and answer site for Embedded Wizard users and UI developers.

Ask your question and receive answers from the Embedded Wizard support team or from other members of the community!

Embedded Wizard Website | Privacy Policy | Imprint

...