You can find the SimpleListView Sample sample project at:
- Start | Programs | Embarcadero RAD Studio Alexandria | Samples and navigate to:
Object Pascal\Multi-Device Samples\User Interface\ListView\SimpleListView
CPP\Multi-Device Samples\User Interface\ListView\SimpleListView
- Subversion Repository:
- You can find Delphi and C++ code samples in GitHub Repositories. Search by name into the samples repositories according to your RAD Studio version.
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 one of the locations given above, and open:
- Delphi: SimpleListView.dproj
- C++: 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.