TVirtualKeyboard = class(TObjectViewAction)
class PASCALIMPLEMENTATION TVirtualKeyboard : public TObjectViewAction
Shows the 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 most important are the following properties: Enabled, FmxObject, ImageIndex, SecondaryShortCuts, ShortCut, Text, ShortCut, Visible.
In difference to ordinary actions (like TAction, TControlAction, TCustomValueRangeAction, and others) TVirtualKeyboard, as the TCustomViewAction descendant, does not propagate 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 under some platforms. See UnsupportedArchitectures, UnsupportedPlatforms.
To display the on-screen keyboard, which is given through the TVirtualKeyboard component, do the following steps:
- 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 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.
The type of the TVirtualKeyboard is set by the KeyboardType property.