Groups > dBase > dBase bug reports > Re: Container Copy/Paste




Container Copy/Paste

Container Copy/Paste
Tue, 25 Mar 2008 18:54:46 -050
All of the items you can place on a form seem to copy and paste just fine. This
makes it easy to drop one item, like a button, set lots of properties for it and
then copy and paste it to get more buttons ALL with the same properties as the
one copied.

Now, when I try that with a container the paste operation seems to now work. 
Examining the code, I see that the container was copied, but not to the form. 
Instead, the new container (Container2) is now contained WITHIN Container1 which
is the one that was copied.

On some of my forms I have three containers, each with two or three buttons
inside them.  It is nice to be able to make the containers visible/invisible and
know that all their contents will also appear or not appear.

However, attempting to use Copy/Paste to get all the containers produces only
containers within the copied container.

Any workarounds?  I tried changing form.Container1.Container2 to form.Container2
but that failed miserably and messed up both containers.

-O. D. Williams-
Debugging code is much harder than writing code.  Therefore, if your  code is as
clever as you are capable of making it, you are, by definition, inadequate to
debug it!
Post Reply
Re: Container Copy/Paste
Tue, 25 Mar 2008 18:57:05 -050
Sorry, the second paragraph of the prior post should read:

Now, when I try that with a container the paste operation seems to NOT work. 

-ODW-
Post Reply
Re: Container Copy/Paste
Wed, 26 Mar 2008 01:39:47 -040
In article <K#RkaOtjIHA.960@news-server>, odwill@nospam.xmission.com 
says...
> All of the items you can place on a form seem to copy and paste just fine.
This makes it easy to drop one item, like a button, set lots of properties for
it and then copy and paste it to get more buttons ALL with the same 
properties as the one copied.
> 
> Now, when I try that with a container the paste operation seems to now
work.  Examining the code, I see that the container was copied, but not to the
form.  Instead, the new container (Container2) is now contained WITHIN 
Container1 which is the one that was copied.
> 
> On some of my forms I have three containers, each with two or three buttons
inside them.  It is nice to be able to make the containers visible/invisible and
know that all their contents will also appear or not appear.
> 
> However, attempting to use Copy/Paste to get all the containers produces
only containers within the copied container.
> 
> Any workarounds?  I tried changing form.Container1.Container2 to
form.Container2 but that failed miserably and messed up both containers.
> 
> -O. D. Williams-
> Debugging code is much harder than writing code.  Therefore, if your  code
is as clever as you are capable of making it, you are, by definition, inadequate
to debug it!


O.D.

Unlike buttons and entryFields, containers are, well, containers. So 
they can hold other objects. In order to avoid the behaviour that you 
are seeing, after copying container1 click on the FORM to give it focus 
since container1 will still have focus. Once the form has focus, do the 
paste operation.

-- 
Geoff Wass [dBVIPS]
Montréal, Québec, Canada

.|.|.|        dBASE info at http://geocities.com/geoff_wass       |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
Post Reply
about | contact