[Gambas-user] Form.Enabled = False

Benoît Minisini gambas at ...1...
Sun Sep 12 22:15:22 CEST 2010


> Gambas 3
> Trying to show a modal window that has to be closed before other windows
> can do anything.
> "Fxy.ShowModal" is not useable, because the form should be placed somewhere
> and not be centered relative to the desktop (why is a modal window
> centered and can't be moved?)

Because modal windows are dialog windows, and it's a common practice to always 
center them on screen.

> So I tried to disable the underlying form FMain. I understand Enable =
> False as: the form is inactive and doesn't accept any inputs. But I got
> funny results. Most of the controls are inactive, some not.
> See example.

Yes, it is not clearly explained on the wiki: native events, i.e. events 
defined in the Control class (MouseUp, MouseDown, MouseMove, KeyPress, 
KeyRelease, Enter, Leave...) are always raised, whatever the value of the 
Enabled property.

Regards,

-- 
Benoît Minisini




More information about the User mailing list