1

I have a problem with a TForm who contain a TMemo. If Autosize is set to True on the TForm, my TForm is halved and then I can size it ...

That's exactly this problem : https://www.youtube.com/watch?v=3eG3kwRgPTo

I'm with Delphi 10.1 Berlin, all is ok with my Delphi XE6.

Did you know how I can fix it ?

Thanks

7
  • I don't see the problem, just use Align property and set it to alClient? Commented Nov 3, 2016 at 13:52
  • Just keep the size like in Delphi :D Commented Nov 3, 2016 at 14:00
  • Ah I see now, you put autosize on the form, not on the memo. Let me check something... Commented Nov 3, 2016 at 14:00
  • 1
    Why do you use Autosize at all? Commented Nov 3, 2016 at 14:00
  • Because I have bottom panel who is hide. I show it only if I get a error with the info in the TMemo. Commented Nov 3, 2016 at 14:01

1 Answer 1

1

You have a kind of circular reference in that the child windows are resizing themselves to the parent and the parent resizing itself to the children, and none of them specifying a width. I agree it is odd that adding a TMemo seems to screw things up but like any circular reference it needs to be broken, so either you need to resize the screen programmatically or, as would probably be better in your case, simply size the panels and don't use the align properties of those. I have tried that approach and it works.

Of course this only allows the top or bottom panel to be made invisible - not those in the middle.

Sign up to request clarification or add additional context in comments.

Comments