Set columns in a TListBox

Posted in Components

Use Columns property for ListBox. For Columns values greater than 0, multiple columns accommodate the items as they wrap beyond the bottom of the list box. The Columns property specifies the number of columns that are visible without having to horizontally scroll the list box.

procedure TForm1.Button1Click(Sender: TObject);
begin
  ListBox1.Columns:=1;
end;