On Aug 6, 2006, at 12:58 PM, Craig Hoyt wrote:

I'm trying to clone controls... I keep getting a 'Class or Method' does not exist error at the 'New' statement. This is copied and pasted right out of the LR;

Dim pb As PushButton
pb=New pushbutton1
pb.caption="OK"

This fails at the same point. Am I missing something... I can't seem to get this working. And, yes I have a control already on the window that I'm trying to clone.

Are you sure that PushButton1 has an index of "0"? Your clones will be pat of a control array.

Also, don't forget that the cloned control will originally appear immediately above the original. It must be moved after its creation.

My goal is to clone a group of controls. Is is possible to clone a parent control and have all child controls also get cloned too?

No. You cannot make "clones of clones" so to speak. Each clone will have the same events code as the original.

You can, if you have a Professional license, create a ContainerControl with a group of controls on it. These can also be created without cloning if you design it in the IDE.

I also don't see any examples for managing user input from multiple cloned controls. Can someone please start me off on the right foot on this. I'm baffled!

If you are cloning the controls themselves you work with the same syntax that you would use for a control array. That would mean referring to the individual control by its Index property.

Terry

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to