Re: setting windows as modal
| From: | Frank M. Kromann | Date: | Tue, 13 Mar 2001 06:01:38 +0000 |
| Subject: | Re: setting windows as modal | ||
| Groups: | php.gtk | ||
| Request: | Send a blank email to php-gtk+get-755@lists.php.net to get a copy of this message | ||
You could also call the set_modal method of the GtkWindow class
$mywin->->set_modal(TRUE);
- Frank
>
> > How are new windows set as modal, so that the parent window cannot be
> > accessed until the child window has been hidden?
>
> You can give a window "the grab" by using grab_add(). This has the effect
> you want - it stops other windows from receiving input.
>
> Example:
>
> $mywin = &new GtkWindow();
> $mywin->connect ('destroy', 'shutdown'); /* where shutdown() is a
> function
> that calls Gtk::main_quit() */
> // etc...
>
> Gtk::grab_add ($mywin);
> Gtk::main();
> Gtk::grab_remove ($mywin);
>
> You should find that any other windows stop responding to events until you
> remove the grab from $mywin (effectively, until $mywin has been closed)
>
> --
> Michael.
>
>
> --
> PHP GTK Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-gtk-unsubscribe@lists.php.net
> For additional commands, e-mail: php-gtk-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>
>
>