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

property Strings[Index: Integer]: Stringdefault;  

The Strings is the run-time only property. With the Strings you can access a specific string, to read or modify the string at a particular position. Index gives the position of the string, where 0 is the position of the first string, 1 is the position of the second string, and so on ("Count - 1" is the position of last string in the list).  
To locate a particular string in the list, call IndexOf method, or use IndexOfName and IndexOfValue methods if the string list is the list of "names=values" (where each string is some "name" and "value", separated with some character).  
Strings is the default property of string list objects. The Strings identifier can be omitted when accessing the Strings property of a string list object. For example, the following two lines of code are both acceptable and do the same thing:  
acStringListContainer1.Strings[0] := 'This is the first string';  
acStringListContainer1[0] := 'This is the first string';  
To determinate the number of strings which currently are available in the list — read Count property.  

See also
Names and Values properties.