stringlistcontainer MaxSize property
Return to Introduction  Previous page  Next page
Applies to
acStringListContainer component.  

Declaration
property MaxSize: Integer;  

Description
The MaxSize specifies the capacity of string list (the maximum number of strings which it can hold).  

Warning!
iiwarning If the list is full (already contains the maximum number of strings), and you are trying to add a new string into list, the FIRST string will be deleted! This feature was added to let you to operate with "FIFO" (first-in-first-out) lists, so if you adding more lines than it can hold, the first line will be automatically thrown out. You can use GetFIFO method to retreive the first line and automatically delete it.  
 
For example, if MaxSize = 100 and you're trying to add 101st string, the first string will be deleted from the list to allow the new string to be added. Anyway, by default the MaxSize set to MaxInt, so it can hold up to 2,147,483,647 lines of text (but of course you can decrease this value if your program requires so).  

See also
Count property;  
GetFIFO, GetAndDeleteItem, Add, Insert, StoreToRegistry and LoadFromRegistry methods.