FMX.Mobile.SimpleListView Sample (C++)
You can find the SimpleListView Sample project at:
- Start | Programs | Appmethod 1.16 | Samples and then navigate to
CPP\Mobile Samples\User Interface\ListView\SimpleListView
- Subversion Repository: http://sourceforge.net/p/radstudiodemos/code/HEAD/tree/branches/RadStudio_XE8//CPP/Mobile%20Samples/User%20Interface/ListView/SimpleListView
When you run the application, it shows a list view and an Edit button on top. You can tap the Edit button to enter edit mode.
In edit mode, a Delete button appears at the bottom of the application. You can select list items and then tap Delete to remove them from the list. Also, in edit mode the Edit button turns into a Done button that you can tap to return to display mode.
How to Use the Sample
- Navigate to the location given above and open SimpleListView.cbproj.
- Press F9 or choose Run > Run.
The Edit button is located at the top-right corner of the application. The application handles the OnClick event of this button, where it enables the edit mode of the list view, shows the Delete and Done buttons, and hides the Edit button.
The Delete button is located at the bottom-left corner of the application, and is hidden by default. The application handles the OnClick event of this button. This event handler deletes any selected list view item.
The Done button is located at the top-right corner of the application, overlapping at design time with the Edit button. However, Done is hidden by default. Edit and Done never overlap at run time. The application handles the OnClick event of the Done button as well. Its event handler disables the edit mode of the list view, shows the Edit button and hides the Delete and Done buttons.