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

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