Re: setting windows as modal

From: Date: Tue, 13 Mar 2001 03:37:24 +0000
Subject: Re: setting windows as modal
References: 1  Groups: php.gtk 
Request: Send a blank email to php-gtk+get-745@lists.php.net to get a copy of this message
> 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.

« previous php.gtk (#745) next »