[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] Reference for unit 'Classes' (#rtl)

TStrings.SetCapacity

Write handler for the TStrings.Capacity property.

Declaration

Source position: classesh.inc line 584

protected procedure TStrings.SetCapacity(

  NewCapacity: Integer

); virtual;

Description

SetCapacity is the write handler for the TStrings.Capacity property. The TStrings implementation of SetCapacity does nothing.

Descendent classes can override this method to set the current capacity of the stringlist to NewCapacity. The capacity is the number of strings the list can hold before it tries to expand its storage space. NewCapacity should be no less than Count.

See also

TStrings.Capacity

  

Capacity of the list, i.e. number of strings that the list can currently hold before it tries to expand.

TStrings.GetCapacity

  

Abstract Read handler for the TStrings.Capacity property.

The latest version of this document can be found at lazarus-ccr.sourceforge.net.