Thanks Terry for the reply. I do have my original pushbutton set to
Index=0, I don't understand your statement about making sure
Pushbutton1 has an index of '0'... Shouldn't it get set to '1' as it
is cloned from the original which is '0'? Either way this is not
explained in the LR and the example in the LR 'as-is' does not
function. You answered my question regarding cloning groups of
controls (not what I wanted to here). I'll look into Containers (I do
have the Pro version) - containers has gotten some bad press since
2005 was released. I'm not sure I want to go down that bumpy road.
I am still unable to clone a simple control. I still get a "class
doesn't exist' error at the 'New' statement. I have a pushbutton
attached to my window, it has an Index of '0', The LR states that
pb=New PushButton1 will be created from the original pushbutton and
be named PushButton1. What the hell am I doing wrong? Can someone
provide me a working example so I can tinker with it. I have no other
source to figure this out myself.
RS has done an extremely poor job of documenting RB and cloning
controls has next to nothing to provide a user any hope of figuring
it out on their own. Geoff I know you lurk... How about putting a
priority on getting some quality documentation for your product. As a
developer I know what a pain documentation is, but it is beyond
necessary for a product such as yours and RS's grade for
documentation has to get an 'F'. The days of relying on NewBurg's
book are long gone. Step up to the plate boys...
Craig
Message: 9
Subject: Re: Cloning Controls
From: Terry Ford <[EMAIL PROTECTED]>
Date: Sun, 06 Aug 2006 14:28:19 -0700
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>