Lazarus
Programming => LCL => Topic started by: Handoko on December 03, 2017, 04:59:53 pm
-
I think it is a bug, but maybe I'm wrong. So I started a poll. Before you vote please read this thread properly, please don't vote if you don't understand the issue.
01. File > New > Application
02. Drop a TPanel to the form
03. Resize the panel by dragging the handles
04. It works
05. On the Object Inspector > click Width (of the panel)
06. Resize the panel's width by dragging the handles
07. It won't work
Is it a bug or behavior planned intentionally?
Similar behavior happens on its height too. Tested on Lazarus 1.8.0RC5 x86_64-linux-gtk2. Can you reproduce it or not? If you can or can't reproduce it, please tell us what is your platform, widgetset and Lazarus version.
-
are you sure you are not just locked by the edition of the panel width in the object inspector ?
-
Works as expected in trunk: I selected panlel1.width in OI than grabbed the sizegrip: the value in OI changed while I was "dragging".
Bart
-
There are several ways how to modify control properties in the Object Inspector such that the control's size cannot be changed any more (Anchor editor, child sizing). You should condense the issue into a little project where it can be reproduced and which you upload here.
-
I did the test in Linux Mint 18.2 Mate, using Lazarus 1.9.0 (SVN 56537M), and I did have such a problem.
-
Thank you for testing and providing the animated screenshot.
Yes, this is exactly the issue I mentioned.
If this behavior is intended (like what KemBill said), the resizing is locked because the Object Inspector is waiting us to provide a value, but why it didn't happen on Bart's test.
I think it is a bug.
-
I cant test it, but from the description it is a bug.
IIRC we fixed a problem with the same misbehaviour before (quite a while back). But I cant find the old issue report. Anyway a new issue report is in order
-
I tested it with the trunc.
As long as you have selected the width from the panel in the object inspector you can't resize the panel.
Jos
-
Handoko, that is not a bug:
- The height or width is selected in the object inspector, which means it has priority over any other modifications
- The IDE must now respect what the Object inspector value does, not the mouse or arrows.
- Once you change the focus or press tab, the IDE behaves like you want.
This is completely logical. You intended to modify by coordinates by value, not by anything else.
So the focus should be changed away from a width/height field to have again the mouse and keyboard behavior.
That's a feature and not a bug.
Unless you mean that a non-client area, like the resizer on a form - or the Keyboard - , should take over the focus.... That's a feature request (and I am against such a feature, without option)
The keyboard can't properly change focus without the controls being filtered, for one... And the tab works...
-
So we have some clues from those who have tested it and need to know which platform Bart and nummer8 are running on using to see if the discrepancy could be OS / widget related.
The panel can be resized
Me: 1.8.0RC5 / Win7 64bit.
Bart: not known.
The panel can't be resized
Handoko: Lazarus 1.8.0RC5 x86_64-linux-gtk2
tomitomy: Linux Mint 18.2 Mate, using Lazarus 1.9.0 (SVN 56537M)
nummer8: not known.
-
@Noodly
The behavior is consistent over widget sets (I tested Windows and GTK2)
The behavior is like that because what I explained.
-
@Thaddy
Thank you for the explanation. I thought so too, that's why I asked it is a bug or not.
This feature is confusing (especially for newbies). For example, I clicked the Width on the Object Inspector but I forgot I clicked it. Then I add some new buttons on the form but I can resize it. The first thing will come on my mind is, I found a bug. I believe some will think what as what I do.
If it is really a feature, then it's okay. I can live with it. But I wonder how other think, so I started a poll. I won't vote, I would like to hear what others think.
-
I do not get get the same behaviour as Handoko.
At step 7 - whether or not width or height is selected in the object inspector - I can resize the panel using the mouse and the value of height or width changes accordingly in the object inspector while I'm moving the mouse.
01. File > New > Application
02. Drop a TPanel to the form
03. Resize the panel by dragging the handles
04. It works
05. On the Object Inspector > click Width (of the panel)
06. Resize the panel's width by dragging the handles
07. It does work
1.8.0RC5 Win7 64
-
I would still say report it as a bug.
It got fixed one or two years back, when the same thing had happened then.
Also it works on windows...
-
No matter this is a bug or feature, this behavior is inconsistent between Linux and Windows. I tested it again on Lazarus 1.6 Windows 7.
If anyone is interested or have something to say, please visit this bug report:
https://bugs.freepascal.org/view.php?id=33426
-
IMO there is no reason why the user should not be able to resize a control, just because one of the affected properties is selected in OI.
I have not been able to reproduce this in Lazarus, and have never seen such behaviour in any of the (ancient) Delphi versions I have owned.
(Lazarus 1.9.0 r57422 FPC 3.0.4 i386-win32-win32/win64 32-bit fpc/Lazarus on on Win10-64)
Bart
-
Of course it is a bug. LCL-GTK2 has other similar bugs. My prediction is that when it gets fixed, something else breaks. That happens at least for me every time I try to fix a bug in GTK2 bindings.
.. but somebody should try fixing it anyway.