TVirtualKeyboard = class(TObjectViewAction)
class PASCALIMPLEMENTATION TVirtualKeyboard : public TObjectViewAction
Shows a component stored in the FmxObject property and shows the on-screen virtual keyboard over the surface of this component.
TVirtualKeyboard standard action is executed by clients (controls, menu commands, toolbar buttons) linked to this action, and it shows the component stored in the FmxObject property. TVirtualKeyboard shows the on-screen virtual keyboard over the surface of the shown component.
TVirtualKeyboard extends TCustomViewAction by redeclaring some public properties and events as having published visibility, which makes them editable in the Object Inspector.
The following properties are the most important: Enabled, FmxObject, ImageIndex, SecondaryShortCuts, ShortCut, Text, ShortCut, and Visible.
Contrary to ordinary actions (like TAction, TControlAction, TCustomValueRangeAction, and so on) TVirtualKeyboard, as a descendant of TCustomViewAction, does not distribute changes of Visible, Enabled, Checked, GroupIndex, and OnExecute to the linked clients.
Virtual keyboard components are supported by so-called Platform Services. Therefore, this standard action might not be supported for some platforms. For more information, see UnsupportedArchitectures and UnsupportedPlatforms.
To display the on-screen keyboard provided by the TVirtualKeyboard component, do the following:
- Add a TActionList and a TButton to the form.
- Double-click the TActionList to open the Action List editor.
- Click the arrowhead beside the icon, select New Standard Action > Edit > TVirtualKeyboard, and then click OK.
- In the Object Inspector, set the Action property of the TButton to be the TVirtualKeyboard you just added to the TActionList.
- Run the project.