58 views
in GUI Development by

Hi,

i am trying to display graph to understand the pinch and zoom feature. 

My initial screen had displayed correctly using "SwitchToDialog" as shown below:

I had simulated a graph with random data. This is supposed to be displayed at <110,130,914,340> coordinates as the chart button pressed as shown:

But the graph screen is being updated in the other group area where chart button is located:

I had created separate groups and screens for the four regions being used(top, bottom, left and middle areas.

Please do suggest me correct procedure to achieve the above functionality.

 

1 Answer

+1 vote
by
 
Best answer

Hello,

I suppose, the graph belongs to a component presented as dialog in context of another component found in the lower screen area. If this is the case, please verify the invocation of SwitchToDialog() or PresentDialog(). In the following example, the dialogWithGraph component will appear inside SomeComponent:

SomeComponent.PresentDialog( dialogWithGraph, ... );

In the following example, PresentDialog() is invoked in context of this (the actual component). dialogWithGraph will thus appear in inside of 'this' component:

this.PresentDialog( dialogWithGraph, ... );

... or ...

PresentDialog( dialogWithGraph, ... );

Let's assume, you invoked PresentDialog() or SwitchToDialog() in context of the component containing the buttons 'Set Points' and 'Chart'. Then, the new presented component will appear inside this component with buttons.

To control the behavior, specify explicitly in which context you want the new component to appear. Some of the possible options:

Option 1: You could present the component in context of the owner of the component containing the buttons:

Owner.PresentDialog( dialogWithGraph, ... );

Option 2: You could present the component in context of the application's root component:

rootthis.PresentDialog( dialogWithGraph, ... );

... or if working with EW < 12 ...

GetRoot().PresentDialog( dialogWithGraph, ... );
 

See also the section Take a closer look at the Dialog functionality for more details.

Best regards

Paul Banach

by
Thanks Paul,

I had mentioned the component with context of respective Owner and the component got displayed at designated co-ordinates.

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

...