Recent

Author Topic: Strange form designer behaviour  (Read 871 times)

TheMouseAUS

  • Jr. Member
  • **
  • Posts: 81
Strange form designer behaviour
« on: January 18, 2025, 03:47:39 am »
I have been using Lazarus for about 3 years now (before delphi) I have noticed a behavior which has got me into trouble many times. I use TPageControl in a lot of my projects for tabs. What I have found is that if I have several components on the tabsheet and I try to select them individually holding the shift key there are many times that the PageControl itself gets selected, even though I have only clicked on the components on the sheet. It gets extremely frustrating and there are many times I have deleted a whole layout due to this because if you dont notice, bad things happen. I had a look for bug reports and cant find any, I am surprised I am the only one who seemed to have come across it. The issue gets worse the faster you are trying to select them. I have had several installs in that time from KDE Neon, to Fedora, to now Solus. Behavior has always been there and still is on the current version.

FPC 3.2.2
x86_64-linux-qt6

ps I did post this else where but have realized its really in the wrong section but unable to remove it

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10786
  • Debugger - SynEdit - and more
    • wiki
Re: Strange form designer behaviour
« Reply #1 on: January 18, 2025, 11:12:52 am »
Happens on Windows too.

It may be that it happens if when "shift clicking" any of the controls, the mouse gets moved a tiny bit during the click. Enough to start the "rubber band selection".

It happens in 3.6 too.

1) Verify if the trigger applies
2) report as bug

cdbc

  • Hero Member
  • *****
  • Posts: 1806
    • http://www.cdbc.dk
Re: Strange form designer behaviour
« Reply #2 on: January 18, 2025, 11:20:12 am »
Hi
Hmmm... That has been happening since way back in Delphi 2...
I don't think this warrants a bug-report, 'cause the compiler and the IDE cannot protect people from being fools making mistakes, all on their lonesome, they're tools, not babysitters!
Just my 2 cents worth...
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE5 -> FPC 3.2.2 -> Lazarus 2.2.6 up until Jan 2024 from then on it's: KDE5/QT5 -> FPC 3.3.1 -> Lazarus 3.0

wp

  • Hero Member
  • *****
  • Posts: 12571
Re: Strange form designer behaviour
« Reply #3 on: January 18, 2025, 12:01:50 pm »
Happens on Windows too.

It may be that it happens if when "shift clicking" any of the controls, the mouse gets moved a tiny bit during the click. Enough to start the "rubber band selection".
But I have the feeling that this never happens in Delphi. Probably the threshold sensitivity is too small?

TheMouseAUS

  • Jr. Member
  • **
  • Posts: 81
Re: Strange form designer behaviour
« Reply #4 on: January 18, 2025, 01:47:07 pm »
Happens on Windows too.

It may be that it happens if when "shift clicking" any of the controls, the mouse gets moved a tiny bit during the click. Enough to start the "rubber band selection".

It happens in 3.6 too.

1) Verify if the trigger applies
2) report as bug

I dont know if it is a bug as such but I do find it frustrating at times. When trying to do multiple selections you have to be super accurate or extremely slow and deliberate. I do think the threshold for 'rubber band selection' should be a bit higher or at least configurable?

Martin_fr

  • Administrator
  • Hero Member
  • *
  • Posts: 10786
  • Debugger - SynEdit - and more
    • wiki
Re: Strange form designer behaviour
« Reply #5 on: January 18, 2025, 02:16:51 pm »
At first I thought:
- you have an existing selection
- and you are holding shift
then maybe don't rubber band at all...

But => you can rubber band and add that.

However, if the rubber band stays within a child control then either
- add nothing, as the child was not fully banded
- add that child
- but never add the parent



The issue is something more.
Take a TPanel,
- If you don't hold shift, you select and drag the panel.
- If you hold shift, you don't select the panel (it will be shown selected while the mouse is down, but unselected when the button is released)
  And the rubber band seems to have done nothing.
=> Btw the shift rubber band on the panel will select some of the controls that will be in the rubber band area. But not all??

But if you have a button on a panel, and do the shift rubber band stuff on the button, then it selects the panel.....??

You can also ctrl click to rubber band... And then you can e.g. select child elements of the panel by rubber band.

It seems there is a whole lot of oddities

 

TinyPortal © 2005-2018