Can you Paste in a tab of a TabPanel?

I’ve checked this behaviour only on Windows, but I don’t know if it happens the same on Mac or Linux.

According to Language Reference a TabPanel is “Used to organize controls into groups of tabs that can be selected by the user”
However I find it very difficult to use:

  1. I cannot select a group of controls of a tab with a rectangle (dragging the mouse), as I can do on a window. I drag the mouse but not rectangle is drawn.

  2. I cannot Paste any control on any tab. When you right click a tab “Cut”, “Copy”, “Delete” and “Duplicate” are active but “Paste” is disabled, no matter if something has been “copied” before and is still selected.

Is this behaviour normal or is there a bug about it?

I guess the features you want are not available (yet).

On mac:

  1. I can’t drag the mouse inside the TabPanel, by clicking the mouse I move select the TabPanel
  2. I can’t Paste any control by right clicking inside the TabPanel. If I right click on one control and select Cut, then the whole TabPanel is removed from the window

[quote=413023:@Ramon SASTRE]I’ve checked this behaviour only on Windows, but I don’t know if it happens the same on Mac or Linux.

According to Language Reference a TabPanel is “Used to organize controls into groups of tabs that can be selected by the user”
However I find it very difficult to use:

  1. I cannot select a group of controls of a tab with a rectangle (dragging the mouse), as I can do on a window. I drag the mouse but not rectangle is drawn.

  2. I cannot Paste any control on any tab. When you right click a tab “Cut”, “Copy”, “Delete” and “Duplicate” are active but “Paste” is disabled, no matter if something has been “copied” before and is still selected.

Is this behaviour normal or is there a bug about it?[/quote]

1… A mousedown event inside a control (ie. the Tabpanel) is used to SELECT that control… therefore you end up selecting the Tabpanel as opposed to initiating a “lasso” sequence

2… Paste of controls is not location specific, in that the control is pasted inside the current window, but not at a specific location. But because it is pasted in the window, it does not end up in the panel to start with, you must drag it there.

So in my opinion… [quote] this behaviour is normal[/quote]

Thanks Alberto for checking on OSX.
Thanks Dave for your explanation. It coincides with my own reflection, but I think this is a poor behaviour. Probably I must ask for a new feature, although I imagine that if they have not implemented it before they will not do it now. <https://xojo.com/issue/54011>
When creating this new feature request I’ve seen other problems that may be related: <https://xojo.com/issue/52609>

OMG, what kind of development package IDE am i working with when I can’t even copy a Text box layout from one tab and paste it on a second tab.
Holding the shift key I click on each text box required, then right click to click copy. Click on the tab I want to paste into and PASTE is greyed out. Tried a single text box, and exactly the same.
What the hell, not rapid development so far!!!

try ctrl-D for “Duplicate” then move the copy outside the tabpanel in the grey part of the window editor
move to the right panel, and move back the copy to this tab.

OK so two years later, copy and paste on tabpanel has still not been addressed.
Yes the above works, but why does a paste do it to the same location it was copied from. Duplicate doing this makes sense, but not copy paste.

You should be able to copy an item, then move to somewhere else in the project and paste it.
Currently how do I get the current copied item/s to another form if i wanted.

Has anyone filed a Feedback case about this?

there are many…
copy and paste controls inside a tab or pagepanel don’t work for a long time …
<https://xojo.com/issue/52177>
<https://xojo.com/issue/52250> (closed duplicate)
<https://xojo.com/issue/44860> (fixed ?)
<https://xojo.com/issue/35853> (fixed ?)
<https://xojo.com/issue/10539> (not reproductible)

1 Like

there are many…
copy and paste controls inside a tab or pagepanel don’t work for a long time …

Wow, I had never noticed this before. The workaround is to move the controls off the tab, switch tabs then drag them back on. That’s a workaround, not a solution obviously. I’ll take a look at the cases.

So it looks like there’s an open case and the bug is quite easy to duplicate and it occurs at least on macOS and Windows. I’ll see if we can put some time into this one. It has an easy workaround but it’s also annoying and I’ll bet despite only 7 subscribers, I’ll bet a lot of people run into it.

1 Like

well to be fair, it’s been so long that now it’s not a workaround it’s THE way to do it…

If you copy a control on a TabPanel’s page, the copy still retains the Parent reference of the original (it is a copy after all) so Paste will put it back on the Parent tab. By moving the copy off the tab entirely, the Parent reference gets cleared and you can “re-parent” it onto a different tab, or off the tabpanel entirely.

Personally, I don’t think it’s a bug.

Well I’m sure I’ve run across this, but I tend to find a workaround and then move on, mostly.

You must be a sea-lawyer. While you are correct strickly speaking, it violates the principle of least surprise.

1 Like

The average user expects pasting to put the control on the frontmost tab. Just as copying a control from one layout then switching to another doesn’t paste the control on the original layout but on the one now frontmost.

You must be a sea-lawyer. While you are correct strickly speaking, it violates the principle of least surprise.

Indeed it does. It should be pasted in you tell it. But then, that left pane showing the list of controls should also show the true hierarchy - showing which controls in the tabpanel are on which tab like a true tree view should. Of course, that is my opinion. Yours may differ.