Recent

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

EganSolo

  • Sr. Member
  • ****
  • Posts: 257
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: 931
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 »
Development Installation Lazarus 1.3, FPC 2.7.1,Windows 7/8 32/64, OSX, *nix

Test Environment Lazarus & FPC Trunk on Windows and OSX (Cocoa Mainly on OSX). Testing also Crosscompile windows to OSX.. 
Any posts made from 2015 will be based on Lazarus Trunk.

EganSolo

  • Sr. Member
  • ****
  • Posts: 257
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