341 views
in GUI Development by
Hi Everyone,

   In virtual keyboard layout i want to add <-and ->  these 2 bttons.how to move cursor right and left.can you please guide me tom resolve this

With regards,

Ramesh.G

1 Answer

0 votes
by

Hi Ramesh,

to add a special character key like cursor left or right you can do the following:

1. Extend the ExtendedVirtualKeyboard::ButtonType enum with your special character e.g. CursorLeft

2. Add an ExtendedVirtualKeyboard::Button at the keyboard layout you want to extend. Set at the inspector the Type to your new enum item that you have added at step 1. Also set an icon bitmap if needed. Make sure that it fits inside the layout and that there is no overlapping with other buttons.

3. Go inside the ExtendedVirtualKeyboard::Button.

To support for example the cursor key left you need to extend the onRelease slot with the following condition:

To ensure that this button has also a touchhandler and an icon, extend OnSetType:

Do the same for every other special key you want to support.

Regards,

Julian

by
Hi Julian,

   Thanks for the update.it is working fine but i want to apply cursor right also.

when i add code in onRelase slot it is not working.

 here i have added example code:

if (ExtendedVirtualKeyboard::ButtonType.CursorRight)
{
var Core::Root root=GetRoot();
if ((!TouchHandler.AutoDeflected)&&(root!=null) && (holdDuration ==0))
{
root.DriveKeyboardHitting( Core::KeyCode.Right,'\0',true );
root.DriveKeyboardHitting( Core::KeyCode.Right,'\0',false);

}
for right side move it need to be add any other slot.please guide me to resolve this.
by
Hi Ramesh,

did you also have added the or-conditions inside OnSetType?

I also see at your example code, that you are using 'TouchHandler' and not 'touchHandler'. Is this just a typo?

In addition please use 'else' before 'if (ExtendedVirtualKeyboard::ButtonType.CursorRight)'.

Regards,

Julian
by
Hi Julian,

    Thanks for the update .Issue Resolved.

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

...