FMX.ListView.TListViewBase.OnDeleteChangeVisible

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

property OnDeleteChangeVisible: TDeleteChangeVisibilityEvent read FOnDeleteChange write FOnDeleteChange;

C++

__property TDeleteChangeVisibilityEvent OnDeleteChangeVisible = {read=FOnDeleteChange, write=FOnDeleteChange};

Properties

Type Visibility Source Unit Parent
event public
FMX.ListView.pas
FMX.ListView.hpp
FMX.ListView TListViewBase

Description

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 = "";
  }
}

See Also