Jump to content
PeterPanettone

Cannot copy a TCard in the Structure Panel

Recommended Posts

In the Delphi 10.4 STRUCTURE PANEL, I select a TCard container control (containing several controls) and try to copy it to the clipboard with CTRL+C. It does not work. Even in the EDIT sub-context menu, the Copy item is disabled:

 

image.png.e86bea3661ebd2fa0f51c325fa82d683.png

 

Restarted the IDE. Tried again and again.

 

Can anyone confirm this further annoying IDE bug?

Share this post


Link to post

I don't know if this worked for you in the past, but it never did for me. Same as for TPageControl, you have to create a new page/card, and copy/move all controls from old page/card to new one.

I actually use 10.2.3 not 10.4.

Edited by Mike Torrettinni

Share this post


Link to post
17 minutes ago, Mike Torrettinni said:

I don't know if this worked for you in the past, but it never did for me. Same as for TPageControl, you have to create a new page/card, and copy/move all controls from old page/card to new one.

I actually use 10.2.3 not 10.4.

Thank you for the confirmation. Could there be a WEIRD DIABOLIC PURPOSE of a sick Embarcadero developer mind behind this malfunction? :classic_wacko:

Share this post


Link to post
18 minutes ago, PeterPanettone said:

Could there be a WEIRD DIABOLIC PURPOSE of a sick Embarcadero developer mind behind this malfunction

I don't want to imagine anybody sick, weird and diabolic working on Delphi 🙂

Share this post


Link to post
6 minutes ago, Mike Torrettinni said:

I don't want to imagine anybody sick, weird and diabolic working on Delphi 🙂

That's the moment when the fear of your own imagination increases the suspense in good horror movies. :classic_smile:

Share this post


Link to post
7 minutes ago, Cristian Peța said:

I tried to Copy-Paste. It's working for me in 10.4.0.

From your screenshot, you copied a TCardPanel. Not a TCard.

Edited by PeterPanettone

Share this post


Link to post

You are right, sometimes is working sometimes not. But manual copy from text I think is working always. Switch back to "View as Form" and Paste on an other TCard.

image.thumb.png.43009c09bd49bc3efbc1dc0b8180298f.png

Share this post


Link to post
3 minutes ago, Cristian Peța said:

You are right, sometimes is working sometimes not.

Didn't somebody recently say that computers are DETERMINISTIC?

 

https://en.wikipedia.org/wiki/Determinism

 

6 minutes ago, Cristian Peța said:

But manual copy from text I think is working always.

As long as you have only a button on the TCard, this is easy. Try that with MANY controls and sub-containers on the TCard...

Share this post


Link to post

Basically it is working! It is just that sometimes the Structure View context menu (or the actions behind it) seems not to be properly updated. After opening the context menu from the IDE Designer, the Structure View context menu is working again.

 

Qualifies for a QP entry I think.

Share this post


Link to post
8 minutes ago, Uwe Raabe said:

After opening the context menu from the IDE Designer, the Structure View context menu is working again.

You are almost right: After showing the EDIT context menu directly in the Form Designer (right-click on a visual control in the Form Designer) the "Copy" item is enabled. Then showing the EDIT context menu for the same control in the Structure Panel shows the Copy context menu item still enabled but it is not working when clicking on it or when pressing CTRL+C!

 

Therefore, the trick to copy a TCard with all its sub-controls is as following:

 

1. In the Form Designer, if the TCard is not visible because covered by a full-size control (e.g. a TPanel), click that TPanel and press the ESC key until the TCard is focused. (Look in the Object Inspector).

 

2. Then press CTRL+C to copy the TCard together with all its sub-controls to the clipboard.

 

General rule: To copy a complex object structure, don't use the faulty Structure Panel but use the Form Designer!

Share this post


Link to post

Alternative solution:

 

1. First select the TCard in the Structure Panel

 

2. Then click on the Form Designer's TAB image.png.5a96683c3805a6d5843b15b3118352c3.png to focus the TCard in the Form Designer

 

3. Then press CTRL+C to copy the TCard together with all its sub-controls to the clipboard!

Share this post


Link to post

The FUNDAMENTAL BUG here is that with specific controls like TCard (is that a TControl?) the control is synchronized (and therefore focused) in the Object Inspector BUT not in the Form Designer. I suspect that the causal chain does not go directly from the Structure Panel to the Form Designer but in this way: Structure Panel → Object Inspector → Form Designer and that Object Inspector is the real culprit for the chain interruption for containers like TCard.

 

This is a typical bug that occurs when the complexity of the interacting objects surpasses the developer's capabilities in mastering this complexity.

Edited by PeterPanettone

Share this post


Link to post
1 hour ago, PeterPanettone said:

This is a typical bug that occurs when the complexity of the interacting objects surpasses the developer's capabilities in mastering this complexity. 

Would it be possible for you to restrict your comments to the technical details of the problem?

You know nothing about the circumstances that caused this problem and it's not like it's a showstopper.

Share this post


Link to post
12 minutes ago, Anders Melander said:

Would it be possible for you to restrict your comments to the technical details of the problem?

You know nothing about the circumstances that caused this problem and it's not like it's a showstopper.

Please calm down. Everything is OK. You are being loved and we like you.

Share this post


Link to post

This problem is old, it is at least 2 or 3 years old.

Share this post


Link to post
1 hour ago, vfbb said:

This problem is old, it is at least 2 or 3 years old.

I fear it is MUCH OLDER. Shall we call it PREHISTORIC? :classic_wink:

Share this post


Link to post
4 hours ago, PeterPanettone said:

Yes. Sorry, I forgot to tell, I do the same. This occur randomly with any control. I believe they didn't fix it because it doesn't seem easy to replicate.

Share this post


Link to post
1 hour ago, vfbb said:

I believe they didn't fix it because it doesn't seem easy to replicate.

If true, this would confirm my complexity hypothesis. (See above).

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×