282 views
in GUI Development by
Hi Everyone

     I am creating small form with virtual keyboard .when i click tab button in virtual keyboard cursor not able to move next text box .can you please help me to resolve this.

1 Answer

0 votes
by

Helo GuruRamesh,

the behaviour is so far correct. This is because Tab key has per default no function to toggle between embedded components (e.g. between text boxes). This is a very individual aspect of the particular GUI design.

If you want to handle the Tab key, you would need to explicitly add a Key Handler to the form (or more generic said: to the GUI component) and configure the handler to react to Tab key codes. Then you connect a slot method to the handler. The slot method is the executed when the handler receives the key Tab.

Within the slot method you implement then code to toggle between the text boxes. The selection of a GUI component is controlled by so-called focus (see also: Keyboard events and the focus path). When you want to toggle between two Editor components (named for example Editor1 and Editor2) you have to implement following code in the slot method:

if ( Focus == Editor1 )
  Focus = Editor2;

else if ( Focus == Editor2 )
  Focus = Editor1;

If there are more Text Editor components (or more focusable components), you can implement following code (for the used methods see: Enumerate and search views existing within the component):

// Starting with the actually focused component get the next focusable one
var Core::View nextView = FindNextView( Focus, Core::ViewState[ Enabled, Focusable ]);

// There are no fúrter components. Skip back to the first component
if ( nextView == null )
  nextView = FindNextView( null, Core::ViewState[ Enabled, Focusable ]);

// Select the component
Focus = nextView;

The screenshot demonstrates how such GUI component is assembled. At the runtime the user can toggle between the Push Buttons:

I hope it helps you further.

Best regards

Paul Banach

by
Thank you  Paul Banach.
by
I have one doubt here,In textbox allowed special characters also so how to restrict the special characters in textbox .if any validations is there please guide me to achieve this.

Thanks.
by

Hello GuruRamesh,

can you explain the application case more in detail? I don't understand what you mean with 'restrict special characters'. Generally, the provided Text Editor implementation is just a template. It is intended to be adapted and modified according to the needs of your project. The inline comments within the template provide description and explanation for the implementation.

The new question does not seem to be related to the actual thread. If this is the case, could you please post the question in a new thread?

Best regards

Paul Banach

by
Hi Paul Banach,

    Thanks for the update.sure,i will create new thread.

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

...