API:FMX.ListView.TListView.OnDeleteChangeVisible
Delphi
property OnDeleteChangeVisible: TListViewBase.TDeleteChangeVisibilityEvent read FOnDeleteChange write FOnDeleteChange;
C++
__property OnDeleteChangeVisible;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
event | published | FMX.ListView.pas FMX.ListView.hpp |
FMX.ListView | TListView |
Description
Occurs when the visibility of the Delete button of a list item changes.
FMX.ListView.TListView.OnDeleteChangeVisible inherits from FMX.ListView.TListViewBase.OnDeleteChangeVisible. All content below this line refers to FMX.ListView.TListViewBase.OnDeleteChangeVisible.
Occurs when the visibility of the Delete button of a list item changes.
This event only works when you hide or show the Delete button displayed after a swipe gesture. It does not work when you hide or show the Delete button of a list item when your list view is in edit mode and your list uses an edit mode item appearance of type "Delete".
Sender
is the list view and AValue
determines whether the Delete button was hidden (False
) and now is visible, or it was visible (True
) and now is hidden.
For example, the following event handler fills a status bar with a tip when a Delete button is shown on a list item, and removes that tip from the status bar as soon as the Delete button is hidden again:
Delphi:
procedure TMainForm.ListViewDeleteChangeVisible(Sender: TObject; AValue: Boolean);
begin
if (AValue = False) then
StatusBar.Text := 'Click "Delete" to remove the target item from the list.'
else
StatusBar.Text := '';
end;
C++:
void __fastcall TMainForm::ListViewDeleteChangeVisible(TObject *Sender, bool AValue)
{
if (AValue) {
MainForm->StatusBar->Text = "Click \"Delete\" to remove the target item from the list.";
} else {
MainForm->StatusBar->Text = "";
}
}