Recent

Author Topic: MDIChild no longer shows after installing 2.2.0  (Read 1601 times)

EganSolo

  • Sr. Member
  • ****
  • Posts: 290
MDIChild no longer shows after installing 2.2.0
« on: January 27, 2022, 01:16:06 am »
I'm writing a MDI app. In the version of Lazarus prior to 2.2.0 (I forgot what that version was) the command MyForm.Show would be enough to show a form whose style is set to fsMDIChild.

In this version of Lazarus 2.2.0. this is not working: the form does not show. Please check the very simple test project I've attached. 

I checked the release page for this version and could not see any mention to MDI stuff. Am I missing something?

Josh

  • Hero Member
  • *****
  • Posts: 1274
Re: MDIChild no longer shows after installing 2.2.0
« Reply #1 on: January 27, 2022, 01:56:18 am »
it looks as though form2 is outside bounds of form1
try setting its bounds to within form1 bounds ie
Code: Pascal  [Select][+][-]
  1. If Not assigned(fChildForm)
  2.   then begin
  3.      fChildForm := TForm2.Create(Self);
  4.      fChildForm.Parent := Self;
  5.   end;
  6.   If Not fChildForm.Visible
  7.   then fChildForm.Show;
  8.   fChildForm.SetBounds(10,10,400,300);
« Last Edit: January 27, 2022, 02:05:37 am by josh »
The best way to get accurate information on the forum is to post something wrong and wait for corrections.

EganSolo

  • Sr. Member
  • ****
  • Posts: 290
Re: MDIChild no longer shows after installing 2.2.0
« Reply #2 on: January 27, 2022, 02:59:10 am »
Created a bug report. Done.
Sigh
Reverting to previous version of Lazarus.

 

TinyPortal © 2005-2018