Recent

Author Topic: Pseudo-mdi & docked windows  (Read 949 times)

zoltanleo

  • Full Member
  • ***
  • Posts: 164
Pseudo-mdi & docked windows
« on: August 25, 2018, 12:08:37 am »
Hi guys

I try to create main-window and child-windows which can be docked into main-window. But I have a problem. Main-window is disabled for change when child-window isn't docked.
Whether there is an opportunity to correct this situation?

gif: https://imgur.com/gKzvZ0h
Win7 Ultim x64/Deb 9.7 i386 GTK2:
Lazarus 2.1(r.60225); FPC 3.3.1 (r.41075),
IBX by -Rik-; FB 3.0.4

Sorry for my bad English, I'm using translator ;)

taazz

  • Hero Member
  • *****
  • Posts: 5363
Re: Pseudo-mdi & docked windows
« Reply #1 on: August 25, 2018, 02:17:47 am »
two comments
1) you should never focus the child form in the main form's onactivate event. This is the only reason you can't change things in the main form.
2) don't use the mdi settings of the form, you do not need it for your code so far.
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

zoltanleo

  • Full Member
  • ***
  • Posts: 164
Re: Pseudo-mdi & docked windows
« Reply #2 on: August 25, 2018, 09:52:11 am »
1) you should never focus the child form in the main form's onactivate event
U're absolutely right. It's my most stupid mistake :-[

Thx.
« Last Edit: August 25, 2018, 12:32:25 pm by zoltanleo »
Win7 Ultim x64/Deb 9.7 i386 GTK2:
Lazarus 2.1(r.60225); FPC 3.3.1 (r.41075),
IBX by -Rik-; FB 3.0.4

Sorry for my bad English, I'm using translator ;)