419 views
in GUI Development by
Hi Paul,

 

I have one GUI component named Screen1 where there is function key , So when i press F1 it goes to next GUi component screen2.

Logic I used:

keyHandler to detect F1 key pressed. SO when F1 is pressed,

PresentDialog is used to present the modal (screen2). Where modal screen2 we have one text view and two Function keys

Now if i again pressed F1 it should close the screen2 GUI component.

What is happening is that , it present the Dialog of Screen2 . So it does not get Screen1 Function key access.

How to get the present key access to such situation.

1 Answer

0 votes
by
Hello Pidea,

when the Screen2 is presented, all keyboard events are delivered to this dialog. The typical approach would be thus to handle the F1 key event in Screen2 and dismiss this screen when the user pressed the key. Summarised:

- while Screen1 is presented and the user presses F1, the key handler in Screen1 reacts and e.g. presents the Screen 2.

- while Screen2 is presented and the user presses F1, the key handler in Screen2 reacts and e.g. dismiss the own dialog.

Does it help you further?

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

...