54 views
in GUI Development by

Hello Embedded Wizard Support,

Follow up question from this previous question.

I have now a working full screen simple touch handler which draws 2 lines on the user touch position.
This breaks when i open a new dialog above:
 

 PresentDialog( Application::Global_Numpad, ... );


The Lines are moving and the touch handler is getting called.
How ever the lines are behind the new dialog. I tried the following without success:
 

this.RestackTop( SimpleTouchHandler );
this.RestackTop( CursorLine_Horizontal );
this.RestackTop( CursorLine_Vertical );


Thank you!

1 Answer

0 votes
by
 
Best answer

Hello bjs,

Step1: ensure that the both Line views do exist directly in the Application component. This only guarantees that the lines can be visible even if other components (e.g. Dialogs) are presented.

Step 2-A: If you are working with EmWi 9.30 or newer, configure the StackingPriority of the both Line views. Per default all views have the StackingPriority = 0. Thus changing it to a higher value (e.g. 1) will instruct the Mosaic to not display any other view above the both lines. See also: Control the stacking priority of nested views.

Step 2-B: If you are working with a version 9.20 or older, the implementation will be more complicated. Generally your would need to override the methods Add(), AddBehind(), Restack(), RestackBack(), RestackBehind() and RestackTop() the application component inherits from its base class Core::Group. Within the overridden methods you would then need to always rearrange the line views so they appear above other views. Don't forget to invoke the inherited version  of the method (see super()).

Step 2-C: If you are working with a version 9.20 or older, and you don't want to override the above listed methods, the unique possibility is to structure your application in two main components A and B. The first component A will then be used to display all the contents of your application. It takes over the role of the Application component. The second component B will display only the lines. Within the application you arrange A and B so that B overlays A. Now, when you present a dialog in component A, the contets from B are not overlapped anymore.

I hope, it helps you further.

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

...