Forum > General

MDI Application problem

(1/9) > >>


i have some problem with an MDI application, which i'm worrking on.

I'd also added TPageControl to MDIChild.

I'd made MainFrm as MDI Form, Child as MDI Child. I've implemented such code:

--- Code: Pascal  [+][-]window.onload = function(){var x1 = document.getElementById("main_content_section"); if (x1) { var x = document.getElementsByClassName("geshi");for (var i = 0; i < x.length; i++) { x[i].style.maxHeight='none'; x[i].style.height = Math.min(x[i].clientHeight+15,306)+'px'; x[i].style.resize = "vertical";}};} ---KontaFrm:=TKontaFrm.Create(Self);  KontaFrm.Parent:=MainFrm.MainPanel;  {$ifdef WINDOWS}  KontaFrm.Top:= 0;  KontaFrm.Left:= 0;  KontaFrm.Width:= MainFrm.MainPanel.Width - 4;  KontaFrm.Height:= MainFrm.MainPanel.Height - 4;  {$else}  KontaFrm.Align:= alClient;  {$endif}  if eKmPasek.Text<>'' then KontaFrm.Konta.Text:=eKmPasek.Text;  KontaFrm.NazwaOkna;  KontaFrm.PKFiltr.Text:=KontaFrm.Konta.Text;  KontaFrm.DKFiltr.Text:=KontaFrm.Konta.Text;  KontaFrm.OpFiltr.Text:=KontaFrm.Konta.Text;  KontaFrm.Strony.ActivePage:=KontaFrm.Operacje;  eKmPasek.Clear;  KontaFrm.Show;  KontaFrm.SetFocus;
Problem is, that i can select, switch, focus on Edits, Cobmobox fields with only TAB button. It's no reaction on mouse clicks. Left click doesn't get control active, and right click runs no system popupmenu. There is simply no reaction on mouse clicks.

Where can be a problem? Thank's for all help.

It was not really elegant, but still only way, that's worked.

I've added OnClick event with SetFocus method to every Control, which was on MDIChild (luckily there was not much of it).

If anyone will have better solution, a'm all ears.

Just a remark: MDI applications are deprecated (by microsoft) for the past 20 years and never worked well with Lazarus.
I suggest to re-engineer to an SDI lay-out. Unless you want your software to have an old school look deliberately.

There's a lot of people out there that say MDI is dead.

Doing a Forum Search with 'MDI' gives a long list of matches ..;advanced;search=MDI

Today I saw that it works a little bit, with qt5 ..,51066.msg374371.html#msg374371

Only those that don't understand it will reject it, mean while they attempt the same thing by putting forms inside of forms which for me also works well.. But I like to use a borderless form so I can design my own border and caption area.


[0] Message Index

[#] Next page

Go to full version