dynamicly creating frames problem

Hello,
I'm trying to create more than one instances of the same frame.
p := TFrame2.Create(Self);
When I created second instanse, I got exception with message:
"A component named Frame2 already exists".
How can I solve this problem?
Dmitry_Asked:
Who is Participating?
 
kretzschmarConnect With a Mentor Commented:
just rename the framename after creation to a unique name

(the name is stored in the object self,
so that a second creation cauases this error)
0
 
Dmitry_Author Commented:
kretzschmar: Thanks!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.