[Lazarus] Modal forms: block parent form or application

zeljko zeljko at holobit.net
Sat Jan 29 09:40:34 CET 2011


On Saturday 29 of January 2011 09:29:02 cobines wrote:
> Hello,
> 
> I have two forms Form1 and Form2. Form1 is MainForm with
> ShowInTaskbar=stDefault and Form2 has ShowInTaskbar=True, so they both
> have taskbar buttons, I treat them as separate windows. I show a modal
> form from Form2 which blocks the whole application. Is it possible to
> have it block only Form2, so I can still activate and work in Form1?

There are 2 kinds of modality (at least under qt, but can be applied to any 
X11 app ... don't know for win32 or mac how to do that).
1.Window modal
2.App modal
So, with proper implementation it's possible to make
1.Form modal for 1 form eg. parent form
2.Form modal for application (usual behaviour).

zeljko




More information about the Lazarus mailing list