321 views
in GUI Development by
Hi,

In our project we use the member Style to update the color of a text view in a class for variant change. It is observed that at a particular time when style is updated after Application startup, HandleEvent is not executed and the text remained to appear in its default color. Can you please explain when and why this behavior can occur?

Thanks,

Kavya

1 Answer

0 votes
by

Hi Kavya,

Did you assign your style to the Style property of our root class?
If yes, please check if your text view is accessable via the root object when the style is set. So it has to be part of the root tree.

Rudolf

by
Hi Rudolf,

Yes, Style property of root class is used and text view is a part of the root tree. Style changes are reflected in the same text when application is running.

But at some particular sequence when the Style event is received in the class (Init -> UpdateViewState -> Style), style change is not reflected in the text.This is observed only during initialization when style is received at a particular time interval and not reproducible every time. Is there any corner case where HandleEvent() wouldn't have executed for a style change?
by

Hi Kavya,
within the Init() of a class it may not be part of the root tree already.
I typically prefer to handle all parts belonging to communication with other objects within a 'PostInit' slot and call this slot with a postsignal inside the Init() method. So in this case the root tree might be fine and the style event will be delivered.

Please let me know if this helps you?

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

...