395 views
in GUI Development by

commented 1 day ago by GJFaber

On the left top screen, I have 5 pushButtons and I want to connect them to 5 different screen elements ( DetectorScreen, DataScreen, VideoScreen, MapScreen, and GUSSScreen). In my slot method (Slot Application::Application.ShowScreen) I have coded two different screens element to be selected to go in the blank space within the black Beveled border.

var Core::Group screen;

if ( sender == PushButtonDetector )
  screen = new Application::Detector;
else
  screen = new Application::Data;

SwitchToDialog( screen, null, null, null, null, null, null, null, null, null, false );

But I need three more different screens element and I can't figure out how to code them. I have tried numerous ways but come up with an errors. 

I got this code from the Master Mondays Class video called Mosaic Framework and the time in the video is 1:39:50 SwitchToDialog.

 

These next two screenshots are the Prototyper active with the DetectorDialog and DataDialog. 

I also need coded VideoDialog, MapDialog, and GNSSDialog to come up in the same spot.

Can you please help me thanks mate?

1 Answer

0 votes
by

Hello GJFaber,

the simplest (if I understood the problem correctly) would be to enhance the if-else condition to something similar to:

var Core::Group screen;

if ( sender == PushButtonDetector )
  screen = new Application::Detector;

else if ( sender == PushButtonData )
  screen = new Application::Data;

else if ( sender == PushButtonVideoDialog )
  screen = new Application::Video;

else if ( sender == PushButtonMapDialog )
  screen = new Application::Data;

else if ( sender == PushButtonGNSSDialog )
  screen = new Application::Data;

SwitchToDialog( screen, null, null, null, null, null, null, null, null, null, false );

Does it answer your question?

Best regards

Paul Banach

by
Paul you are a legend if I was near you I would give you a big sloppy kiss and I am not gay too that is how much you have impressed me, It all works. Do you know how many times I have recoded it with no success? Thank you Paul love you mate.
by
Hello GJFaber,

You're welcome! I am happy that it works! :o)

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

...