Table of Contents
You can find the KeyboardTypes sample project at:
- Start | Programs | Embarcadero RAD Studio Sydney | Samples and navigate to:
Object PascalMulti-Device SamplesUser InterfaceKeyboardTypes
CPPMulti-Device SamplesUser InterfaceKeyboardTypes
- Subversion Repository:
This application shows how to use different types of Virtual Keyboard.
How to Use the Sample
- Navigate to the one of the locations given above, and open:
- Delphi: VirtualKeyboardDemo.dproj
- C++: VirtualKeyboardDemo.cbproj
- Press F9 or choose Run > Run.
- Observe that different Virtual Keyboard types (Alphabet, NumberPad, EmailAddress, PhonePad, URL, and others) activate when you place input focus into different edit controls: First Name, Email, Phone, and others.
VKBaseForm, is the main window of the KeyboardTypes sample. It contains the
VertScrollBox1 vertical scrolling area containing the
MainLayout1 contains the following components:
ListBox1list box with multiple list box items containing different TEdit edit controls:
ListBoxItem1contains the First Name edit control (
ListBoxItem2contains the Last Name edit control (
ListBoxItem3contains the City edit control (
ListBoxItem4contains the State edit control (
ListBoxItem5contains the Zip Code edit control (
ListBoxItem6contains the Email edit control (
ListBoxItem7contains the Phone edit control (
ListBoxItem8contains the Web Page edit control (
ToolBar1tool bar containing the Keyboard Types label
- The virtual keyboard type (Alphabet, NumberPad, and others) is stored in the KeyboardType property of edit controls. To change the virtual keyboard type, select an edit control (First Name, Email 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.
If you want to visit the original post, please visit the link below:
You can also use Windows Apps Studio to create applications for Android and iOS devices, and then use the FMX.KeyboardTypes sample to replicate the Select Key Entry Types.