0

I have a custom component. At design time, I drop the component on the form. After that, I right-click on the component and select "Copy" from the drop-down menu. Then, I right-click on a tPanel that resides on the form, and select "Paste", but the component is placed on the form, and not on the tPanel. Can anyone say why the copyied component is not pasted on the right-clicked component?

Sir Rufo
  • 18,395
  • 2
  • 39
  • 73
user2383818
  • 709
  • 1
  • 8
  • 19
  • 3
    Have you tried first selecting the panel (with left-click) and then paste (either via right-click or via Ctrl+V) ? – nullptr May 26 '13 at 20:17
  • I can't reproduce this problem. I create a new VCL forms application, drop a `TPanel` on it, left-click the form to make it the selected container, and then drop a `TEdit` on the form. Right-click, choose `Edit->Copy` from the context menu, right-click `Panel1` (which gets the selection), choose `Edit->Paste`, and `Panel1` now has a new `Edit1` that moves with it when I move `Panel1`. Can you [edit] to include your class declaration and constructor code? – Ken White May 28 '13 at 19:06
  • Hi Ken! I have thinked about, and now I wonder if it has to be with the fact that my component is handling Parent setting like this: procedure MyComponent.Parent (aParent: TWinControl); begin inherited Parent := aParent; end; Could it Be? – user2383818 May 31 '13 at 17:51

0 Answers0