This is a sample that shows the use of a popup keyboard in desktop applications using FireMonkey.
You can find the ScrollableFormDemo sample project at:
- Start > Programs > Appmethod > Samples and navigate to Object Pascal\FireMonkey Desktop\ScrollableFormDemo.
- Subversion Repository for Object Pascal: http://sourceforge.net/p/Appmethod/code/HEAD/tree/branches/Appmethod_113/Object%20Pascal/FireMonkey%20Desktop/ScrollableForm/
This application illustrates how to use a virtual keyboard on a scrolable form in desktop applications.
How to Use the Sample
- Navigate to the location given above, and open ScrollableFormDemo.dproj.
- Press F9 or choose Run > Run.
- To observe the functionality of the Virtual Keyboard, follow the steps:
- To invoke the virtual keyboard, use one of the TEdit controls or the TMemo control. Observe that for the Read only edit control and Disable edit control the virtual keyboard is not displayed.
- To close the virtual keyboard, use the No edit control button.
- Observe that there are different virtual keyboard types for the edit controls and when the keyboard is displayed, the application moves the entry field to a position above the keyboard. For correct functioning, you should also increase the size of the working region.
KeyboardDemoForm represents the main form of the sample. It contains objects like:
- The event handlers for the OnVirtualKeyboardShown and OnVirtualKeyboardHidden events of the TForm object are used to scroll the TVertScrollBox and adapt the view to the object in focus.
- The TForm1.UpdateKBBounds procedure gets the object in focus and updates the keyboard bounds, scrolling the form if needed. OnCalcContentBounds is used to increase the size of the working region.