Recent

Author Topic: [bug may be only with Windows] PageContrtol TabSheet - Paste bug?  (Read 435 times)

Nicole

  • Hero Member
  • *****
  • Posts: 1069
Is this a bug?
(Version 3.0)

Do this:

- have several TPageControls
- each has several TTabSheets
- choose one of the Tabsheets
- cut it
- paste it to a different page control

=> I saw an error message and the IDE freezing. After some minutes it recovered, said error and has eaten the very TabSheet.

After reading the answers, reported:
https://gitlab.com/freepascal.org/lazarus/lazarus/-/issues/41598
« Last Edit: April 15, 2025, 09:20:49 pm by Nicole »

wp

  • Hero Member
  • *****
  • Posts: 12761
Re: PageContrtol TabSheet - Paste bug?
« Reply #1 on: April 14, 2025, 05:42:30 pm »
Is this a bug?
Yes, I can confirm it, not only with Laz 3.0, but also with current Laz/main. My feeling is that such a parent change is not possible for this kind of control, because it also does not work to drag a tabsheet in the Object Tree (above the Object Inspector) to another pagecontrol. But please file a bug report - the IDE definitely should not hang.

Bart

  • Hero Member
  • *****
  • Posts: 5557
    • Bart en Mariska's Webstek
Re: PageContrtol TabSheet - Paste bug?
« Reply #2 on: April 14, 2025, 06:29:21 pm »
The IDE is doing a stacktrace (and probably logging that), which causes a freeze.

IIRC then cut/paste a TTabSheet doesn't work in Delphi either.

Bart

wp

  • Hero Member
  • *****
  • Posts: 12761
Re: PageContrtol TabSheet - Paste bug?
« Reply #3 on: April 14, 2025, 07:31:14 pm »
The IDE is doing a stacktrace (and probably logging that), which causes a freeze.
But wouldn't it be better to detect that the TabSheet is pasted into a different parent and just raise an exception?

IIRC then cut/paste a TTabSheet doesn't work in Delphi either.
I tested with XE 11.3 CE and D7:
  • In the Object Tree, it is possible to drag a Tabsheet node to another pagecontrol. In our case, the drag cursor indicates that it is not possible to drop the node on the other pagecontrol.
  • In the TabSheet's contextmenu, the commands to "Cut" and "Copy" are grayed.

Bart

  • Hero Member
  • *****
  • Posts: 5557
    • Bart en Mariska's Webstek
Re: PageContrtol TabSheet - Paste bug?
« Reply #4 on: April 14, 2025, 10:23:49 pm »
IIRC there is a bugreport out there about not being able to change the parent of a TTabSheet to another TPageControl, which (again IIRC) can be done in Delphi.

The freeze with the backtrace is also happenng to me frequently when I have a simple (console) project like:
Code: Pascal  [Select][+][-]
  1. begin |
  2. end.

where | indicates the caret, and I then press Enter.
It may freeze for > 1 minute, and strange things happen on the display (e.g. the icons of the main toolbar getting stretched to about half the size of my screen).

Bart

 

TinyPortal © 2005-2018