869 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 - Archive

Welcome to the Ask Embedded Wizard archive. This community forum served us well for many years, but we've evolved our support approach!

Your resources:

The Embedded Wizard Online Documentation provides comprehensive documentation, tutorials, examples and ready-to-use software packages.

For dedicated assistance, explore our Embedded Wizard Product Support.

You can still browse the valuable discussions from our community history here.

Embedded Wizard Website | Privacy Policy | Imprint

...