Forum Discussion

AndrewK1975's avatar
AndrewK1975
New Contributor
9 years ago
Solved

TStrings using

Hi support and all,

I've droped an ListBox on my users form and want read strings are added to this ListBox in cycle.

 

UserForms.ControlPanel.FilesLB is my TcxListBox class control on the user panel

 

I using this delphi script code:

 

For i := o to UserForms.ControlPanel.FilesLB.Items.Count - 1 do

  begin

  S := UserForms.ControlPanel.FilesLB.Items[i].Text;

  Log. Message(S);

  end;

 

The problem is that my construction rise error during execution and calling this:

 

UserForms.ControlPanel.FilesLB.Items[i].Text;

 

The Items property has TStrings class and how it stays in help: can be called by index (using square brackets): MyStrings.Items[Index]

 

But in reality it does not function.

My question: How I can take sting by string using index of ListBox (TStrings)??