RAD Studio 10.4.1 is now available! Learn more. Looking for discounts? Visit our Special Offers page!
CodeDelphiIDERAD Studio

Learn How To Select Key Entry Types With The FMX.KeyboardTypes Sample In RAD Studio For Android And iOS Devices

Location

You can find the KeyboardTypes sample project at:

Description

This application shows how to use different types of Virtual Keyboard.

How to Use the Sample

  1. Navigate to the one of the locations given above, and open:
    • Delphi: VirtualKeyboardDemo.dproj
    • C++: VirtualKeyboardDemo.cbproj
  2. Press F9 or choose Run > Run.
  3. Observe that different Virtual Keyboard types (AlphabetNumberPadEmailAddressPhonePadURL, and others) activate when you place input focus into different edit controls: First NameEmailPhone, and others.

Classes

TVKBaseForm, named VKBaseForm, is the main window of the KeyboardTypes sample. It contains the VertScrollBox1 vertical scrolling area containing the MainLayout1 layout. MainLayout1 contains the following components:

Implementation

  • The virtual keyboard type (AlphabetNumberPad, and others) is stored in the KeyboardType property of edit controls. To change the virtual keyboard type, select an edit control (First NameEmail or other) in the Form Designer and select an needed virtual keyboard type in the KeyboardType property in the Object Inspector.
  • The event handlers for OnVirtualKeyboardShown and OnVirtualKeyboardHidden events of the VKBaseForm object are used to scroll the VertScrollBox1 scroll box and adapt the view to the height of the Virtual Keyboard.
File:KeyboardType1.png
File:KeyboardType2.png
File:KeyboardType3.png

If you want to visit the original post, please visit the link below:

http://docwiki.embarcadero.com/CodeExamples/Sydney/en/FMX.KeyboardTypes_Sample


Reduce development time and get to market faster with RAD Studio, Delphi, or C++Builder. Design. Code. Compile. Deploy. Start Free Trial   Free Delphi Community Edition   Free C++Builder Community Edition   Upgrade Today
Sign up for our daily posts newsletter!

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

IN THE ARTICLES