Recent

Author Topic: A stubborn edit box  (Read 4073 times)

katfo

  • New Member
  • *
  • Posts: 39
A stubborn edit box
« on: July 28, 2017, 04:12:07 pm »
Hello again

I have a form which contains three edit boxes. The first two act normally but the third is a stubborn one. What I mean by this is that I can’t change its height. Every time I try to do it in the properties window, the height won’t change. However I can change its width, left and top-properties normally. I tried to do it also using program code, but it didn’t help. What could be the problem here? Thank you once more.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: A stubborn edit box
« Reply #1 on: July 28, 2017, 04:42:24 pm »
set autosize to false.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

katfo

  • New Member
  • *
  • Posts: 39
Re: A stubborn edit box
« Reply #2 on: July 28, 2017, 04:49:43 pm »
Yes, that solved it, thank you. But why? The other “normal” ones have Autosize=True and I have no problems with them.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: A stubborn edit box
« Reply #3 on: July 28, 2017, 04:52:03 pm »
Yes, that solved it, thank you. But why? The other “normal” ones have Autosize=True and I have no problems with them.
the normal behavior is that if autosize is true height can not be changed are you sure they are Tedit and not Tmemo ?
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

katfo

  • New Member
  • *
  • Posts: 39
Re: A stubborn edit box
« Reply #4 on: July 28, 2017, 05:19:55 pm »
Yes, they are Tedits and their Autosize is true.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: A stubborn edit box
« Reply #5 on: July 28, 2017, 06:25:06 pm »
Yes, they are Tedits and their Autosize is true.
erm I'm trying to recreate what you see and I can not. is there any way to get a small sample that reproduces the problem? something simple like copy the 3 controls and paste them in an empty form and post that form somewhere, should be enough as long as the problem is there. Which version of lazarus are you using?
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

katfo

  • New Member
  • *
  • Posts: 39
Re: A stubborn edit box
« Reply #6 on: July 28, 2017, 08:41:31 pm »
I made as you said. The project is in file test.rar in http://s000.tinyupload.com/?file_id=10352161028595830494 and the badly behaving guy is edit3. I tested the new project and its behaviour is still the same. Lazarus is version 1.62 and I am using Windows 10.

Handoko

  • Hero Member
  • *****
  • Posts: 5131
  • My goal: build my own game engine using Lazarus
Re: A stubborn edit box
« Reply #7 on: July 28, 2017, 09:07:31 pm »
No problem here. I downloaded and tested your file. I saw those TEdits' autosize is True, I simply set them false then all the 3 TEdits' height can be resized freely. Tested on Lazarus 1.6.4 Gtk2 Linux 64-bit.

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: A stubborn edit box
« Reply #8 on: July 28, 2017, 09:11:18 pm »
No problem here. I downloaded and tested your file. I saw those TEdits' autosize is True, I simply set them false then all the 3 TEdits' height can be resized freely. Tested on Lazarus 1.6.4 Gtk2 Linux 64-bit.
It works as expected in lazarus 1.6.4, only edit3 is sizable in height. Probably some sort of a bug in 1.6.2. Try upgrading to the latest stable version.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

carl_caulkett

  • Sr. Member
  • ****
  • Posts: 306
Re: A stubborn edit box
« Reply #9 on: July 28, 2017, 09:19:59 pm »
I tried in Lazarus 1.8.0 RC3 on Apple Mac 10.12.6 with the Carbon widget set. It works exactly as expected. As Taazz says, only Edit3 is sizable. This is because its AutoSize is set to False. Difficult to imagine how a bug would discriminate between different components of the same class.
"It builds... ship it!"

Mac Mini M1
macOS 13.6 Ventura
Lazarus 2.2.6 (release version)
FPC 3.2.2 (release version)

taazz

  • Hero Member
  • *****
  • Posts: 5368
Re: A stubborn edit box
« Reply #10 on: July 28, 2017, 09:29:54 pm »
I tried in Lazarus 1.8.0 RC3 on Apple Mac 10.12.6 with the Carbon widget set. It works exactly as expected. As Taazz says, only Edit3 is sizable. This is because its AutoSize is set to False. Difficult to imagine how a bug would discriminate between different components of the same class.
with the funky resizing mechanism in lcl anything is possible.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

katfo

  • New Member
  • *
  • Posts: 39
Re: A stubborn edit box
« Reply #11 on: July 29, 2017, 08:57:01 am »
Thank you all for your help. I switched to version 1.6.4 and everything seems to work now as it should.

 

TinyPortal © 2005-2018