Hi,
I'm not sure how to use AddObject.
What I wanna do is...
I use 3 TEdits, 1 TListBox, and 1 TButton.
I write some words in each Edits.
When I push the Button, the name I put into Edit1 will be shown in ListBox.
Then if I choose a certain name from ListBox, the information I put into each 3Edits will be shown again.
I did it once using dynamic array but I want to use AddObject.
I made a class like
TData = class
Text1, Text2, Text3: String;
end;
and used AddObject
ListBox.Items.AddObject(Edit1.Text, Data);
but what should I do next?
Thanks in advance.
I'm not sure how to use AddObject.
What I wanna do is...
I use 3 TEdits, 1 TListBox, and 1 TButton.
I write some words in each Edits.
When I push the Button, the name I put into Edit1 will be shown in ListBox.
Then if I choose a certain name from ListBox, the information I put into each 3Edits will be shown again.
I did it once using dynamic array but I want to use AddObject.
I made a class like
TData = class
Text1, Text2, Text3: String;
end;
and used AddObject
ListBox.Items.AddObject(Edit1.Text, Data);
but what should I do next?
Thanks in advance.