FMX.Mobile.KeyboardToolbar Sample (C++)

From Appmethod Code Examples
Jump to: navigation, search

This is a sample that shows the use of a pop-up keyboard in mobile applications using FireMonkey.

Note: This sample application only works on iOS. It does not work on Android.
Click Add to create a new custom button


You can find the FireMonkeyMobile KeyboardToolbar sample project at:


This application illustrates how to customize the toolbar associated to the virtual keyboard using the IFMXVirtualKeyboardToolbarService.

Entering the caption for a button being created

How to Use the Sample

  1. Navigate to the location given above and open KeyboardToolbar.cbproj.
  2. Press F9 or choose Run > Run.
  3. To observe the functionality of the Keyboard Toolbar, follow the steps:
  • To invoke the virtual keyboard, use the TEdit control (named Edit1).
  • To enable or disable the Keyboard Toolbar, switch the TSwitch control (named swToolbar) On or Off.
  • To add a TVirtualKeyboardToolButton to the Keyboard Toolbar, use the Add button (named btnAdd). Notice that the button is visible in the Keyboard Toolbar (appeared over the virtual keyboard) and in the TListBox list box (lbButtons).
  • To remove a TVirtualKeyboardToolButton from the Keyboard Toolbar, select the button from the TListBox list box (lbButtons) and press the Delete button (named btnDelete).
My button is created. Press it


FireMonkey KeyboardToolbar represents the main window of the sample. It contains the following components:

  • TToolBar named ToolBar1.
    • Two TButton buttons named btnAdd and btnDelete
  • TListBox named lbButtons. It is intended to contain keyboard toolbar buttons created with the btnAdd button.
  • TListBox named ListBox1. It contains:



See Also