Copy/Paste Form object - odd behaviour

Issues related to forms.
WWBman
 
 
Posts: 644
Joined: Fri Jan 08, 2010 6:10 pm

Copy/Paste Form object - odd behaviour

Post by WWBman » Mon Oct 16, 2017 3:55 pm

1. Put an object e.g. Button on a form (Button1)
2. Copy and Paste the button.
3. Drag the button to somewhere else on the form.
4. The button just dragged is the original button1 and not Button2.

I realised this after being puzzled as to why a Button wasn't working until I looked at the Object Manager and saw that it was outside the form.
Of course if you just move the new object (Button2) it immediately becomes part of the form again which would usually happen if the new button was the one dragged.

This doesn't happen if you Copy and Paste an object outside a form, i.e. the dragged object is the new one which is what I would expect.

User avatar
Pablo
 
Posts: 13990
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Copy/Paste Form object - odd behaviour

Post by Pablo » Mon Oct 16, 2017 5:16 pm

When you paste an object then it will not be part of the form, you will need to drag it inside the form.
Note that this is not new behavior, it has always worked this way.

WWBman
 
 
Posts: 644
Joined: Fri Jan 08, 2010 6:10 pm

Re: Copy/Paste Form object - odd behaviour

Post by WWBman » Mon Oct 16, 2017 5:34 pm

The new object after paste is in the same place as the old object inside the form.
That’s OK, but the problem is that when you drag it away, the dragged object is the old object and not the new object.
This works differently from objects outside of a form.

User avatar
Pablo
 
Posts: 13990
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Copy/Paste Form object - odd behaviour

Post by Pablo » Mon Oct 16, 2017 6:04 pm

I was not able to reproduce this behavior.
Can you reproduce this in a new project?

WWBman
 
 
Posts: 644
Joined: Fri Jan 08, 2010 6:10 pm

Re: Copy/Paste Form object - odd behaviour

Post by WWBman » Mon Oct 16, 2017 6:06 pm

Yes, it’s repeatable every time.
I’ve tried several times and it’s the same with the 64bit version as well.

User avatar
Pablo
 
Posts: 13990
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Copy/Paste Form object - odd behaviour

Post by Pablo » Mon Oct 16, 2017 6:08 pm

Strange... it works correct for me.
Can you please post your project?

WWBman
 
 
Posts: 644
Joined: Fri Jan 08, 2010 6:10 pm

Re: Copy/Paste Form object - odd behaviour

Post by WWBman » Mon Oct 16, 2017 6:18 pm

I will do but it’ll just be a project started anew.
I’ve just noticed that if you do further pastes then these work correctly i.e. button3, button4, etc. after dragging.

WWBman
 
 
Posts: 644
Joined: Fri Jan 08, 2010 6:10 pm

Re: Copy/Paste Form object - odd behaviour

Post by WWBman » Mon Oct 16, 2017 6:28 pm

Project sent.
Pablo, this obviously is not urgent so whenever you like's fine.

User avatar
Pablo
 
Posts: 13990
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Copy/Paste Form object - odd behaviour

Post by Pablo » Mon Oct 16, 2017 8:19 pm

Thanks for sending the project.
However I cannot find anything wrong.

Can you please describe the exact steps to reproduce the behavior with your project?

WWBman
 
 
Posts: 644
Joined: Fri Jan 08, 2010 6:10 pm

Re: Copy/Paste Form object - odd behaviour

Post by WWBman » Mon Oct 16, 2017 9:19 pm

Here is a video to show the issue.
https://www.mediafire.com/file/f190na64 ... 201_44.avi

You can see in the Object Manager that the button which stays in the form is Button1 (the one on the right).
Button2 is correctly outside the form (until it's moved) but it's the one in the original position (on the left).
I would expect Button2 to be on the right after the drag, not Button1.

User avatar
Pablo
 
Posts: 13990
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Copy/Paste Form object - odd behaviour

Post by Pablo » Tue Oct 17, 2017 7:21 am

Thanks for the video. But I do not see anything wrong, it works as expected as far as I can tell.
- button1 is added to the form.
- copy/paste adds button2 , it is not part of the form.
- then you move button1 (see the selecting in the Object Manager)
- button2 stays in place

User avatar
Biju
 
 
Posts: 188
Joined: Thu Mar 10, 2016 7:02 pm
Location: Kerala, INDIA.

Re: Copy/Paste Form object - odd behaviour

Post by Biju » Tue Oct 17, 2017 7:48 am

When you do paste action the Button2 will be pasted behind the Button1. So when you click, the Button1 will be selected as it is on top.
If you want to move Button2 after copying just use 'Right Arrow' OR keep cursor inside form area where you want the Button2 to be copied then press 'CTRL+v' (windows shortcut for paste)
~ Remain Curious
and Keep Learning ~

_________________

WWBman
 
 
Posts: 644
Joined: Fri Jan 08, 2010 6:10 pm

Re: Copy/Paste Form object - odd behaviour

Post by WWBman » Tue Oct 17, 2017 8:04 am

Biju wrote:
Tue Oct 17, 2017 7:48 am
When you do paste action the Button2 will be pasted behind the Button1. So when you click, the Button1 will be selected as it is on top.
If you want to move Button2 after copying just use 'Right Arrow' OR keep cursor inside form area where you want the Button2 to be copied then press 'CTRL+v' (windows shortcut for paste)
That is the whole point, BUTTON1 is behind Button2 (not the other way round) but when you do the drag it's Button1 that's moved not Button2.
I would expect that Button2 to be dragged, this is how it works outside of a form.

BTW a paste inside a form always uses Paste in Place, at least it does on mine :-)

User avatar
Pablo
 
Posts: 13990
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: Copy/Paste Form object - odd behaviour

Post by Pablo » Tue Oct 17, 2017 8:44 am

That is the whole point, BUTTON1 is behind Button2 (not the other way round) but when you do the drag it's Button1 that's moved not Button2.
That is because button2 is not part of the form.

WWBman
 
 
Posts: 644
Joined: Fri Jan 08, 2010 6:10 pm

Re: Copy/Paste Form object - odd behaviour

Post by WWBman » Tue Oct 17, 2017 8:59 am

I've created many forms and I can't believe this is how it's always worked with forms.
When you copy and paste you expect to be able to drag the new one straight away and you do not expect the original one to be moved.
Why would you because the original one is positioned where you want it.
Also, if you do another paste then this works as I would expect, i.e. the drag moves the new one.

Objects outside of a form work as I would expect, i.e. the new one is dragged and the original one stays where it is.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests