Show: Delphi C++
Display Preferences

Vcl.StdCtrls.TCustomListBox.Clear

From RAD Studio API Documentation
Jump to: navigation, search

Delphi

procedure Clear; override;

C++

virtual void __fastcall Clear();

Properties

Type Visibility Source Unit Parent
procedure
function
public
Vcl.StdCtrls.pas
Vcl.StdCtrls.hpp
Vcl.StdCtrls TCustomListBox

Description

Deletes all items from the list box.

Use Clear to delete all of the items in the list box at once. Although the items in a standard list box are of type TStrings, use the Clear method of the list box rather than calling the Clear method of the Items property. This allows descendants of TCustomListBox to perform any other necessary clean-up in the Clear method, in addition to deleting the items from the Items property. Thus, applications should use



ListBox1.Clear;



ListBox1->Clear();



rather than



ListBox1.Items.Clear;



ListBox1->Items->Clear();



See Also

Personal tools
In Other Languages
Previous Versions
Assistance