Lazarus

Programming => LCL => Topic started by: Handoko on December 03, 2017, 04:59:53 pm

Title: Bug or not?
Post 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.
Title: Re: Bug or not?
Post by: KemBill on December 03, 2017, 05:46:56 pm
are you sure you are not just locked by the edition of the panel width in the object inspector ?
Title: Re: Bug or not?
Post by: Bart on December 03, 2017, 06:11:12 pm
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
Title: Re: Bug or not?
Post by: wp on December 03, 2017, 06:21:08 pm
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.
Title: Re: Bug or not?
Post by: tomitomy on December 04, 2017, 07:29:52 am
I did the test in Linux Mint 18.2 Mate, using Lazarus 1.9.0 (SVN 56537M), and I did have such a problem.
Title: Re: Bug or not?
Post by: Handoko on December 04, 2017, 07:39:00 am
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.
Title: Re: Bug or not?
Post by: Martin_fr on December 04, 2017, 08:10:36 am
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

Title: Re: Bug or not?
Post by: nummer8 on December 04, 2017, 09:43:32 am
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
Title: Re: Bug or not?
Post by: Thaddy on December 04, 2017, 10:41:25 am
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...
Title: Re: Bug or not?
Post by: Noodly on December 04, 2017, 12:27:35 pm
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.
Title: Re: Bug or not?
Post by: Thaddy on December 04, 2017, 12:40:10 pm
@Noodly
The behavior is consistent over widget sets (I tested Windows and GTK2)
The behavior is like that because what I explained.
Title: Re: Bug or not?
Post by: Handoko on December 04, 2017, 01:18:36 pm
@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.
Title: Re: Bug or not?
Post by: Noodly on December 04, 2017, 01:31:42 pm
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
Title: Re: Bug or not?
Post by: Martin_fr on December 04, 2017, 01:32:36 pm
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...
Title: Re: Bug or not?
Post by: Handoko on March 14, 2018, 06:36:34 am
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
Title: Re: Bug or not?
Post by: Bart on March 14, 2018, 04:53:33 pm
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
Title: Re: Bug or not?
Post by: JuhaManninen on March 14, 2018, 05:05:04 pm
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.
TinyPortal © 2005-2018