FMX.Mobile.TabletMasterDetailwithSearch Sample (Object Pascal)
You can find the TabletMasterDetailwithSearch Sample project at:
- Start | Programs | Appmethod | Samples and then navigate to Object Pascal\Samples\User Interface\TabletMasterDetailWithSearch
- Subversion Repository: http://sourceforge.net/p/Appmethod/code/HEAD/tree/branches/Appmethod_113/Object%20Pascal/Samples/User%20Interface/TabletMasterDetailWithSearch
When you run the application, it shows a two columns. The column on the left-hand side shows a list of people and includes a search box. The column on the right-hand side shows details (a picture, name, job and "description") about the person currently selected on the list view.
You can tap list view entries to select them and load their information on the right-hand side column. You can also click the Prior and Next button on the top-right corner of the application to navigate the list view items.
You can also enter text in the search box of the list view to filter the list of people.
How to Use the Sample
- Navigate to the location given above and open TabletMasterDetailwithSearch.dproj.
- Press F9 or choose Run > Run.
This application handles the OnItemClick event of the list view with a procedure that takes the TPrototypeBindSource to the clicked entry, so that the right-hand side column of the application shows that information.
This application contains a TActionList with two actions that are associated with the Prior and Next buttons. These actions are the standard TFMXBindNavigatePrior and TFMXBindNavigateNext actions and they are linked with the TPrototypeBindSource through their DataSource property and have event handlers for their OnExecute and OnUpdate events. The Execute event handler takes the TPrototypeBindSource to the next entry and the Update event handler disables when there is no prior or following item, respectively.