Re: Keeping focus with a dialog
| From: | Markus Fischer | Date: | Mon, 18 Mar 2002 16:22:19 +0000 |
| Subject: | Re: Keeping focus with a dialog | ||
| References: | 1 | Groups: | php.gtk.general |
| Request: | Send a blank email to php-gtk-general+get-1580@lists.php.net to get a copy of this message | ||
On Mon, Mar 18, 2002 at 03:08:38PM +0000, Michael Dransfield wrote :
> I am trying to make popup forms (new/edit forms for a db) using a
> gtkDialog.
>
> I would like 2 things.
>
> 1. What is the best way to make sure that the main gtkWindow cant
> receive focus? I could see many ways to actually do this (i assume the
> focus_out_event has something to do with it). What is the tried and
> trusted method to make it so that they cant loose the modal dialog
> beneth the main application window (and loose any way to interact with
> the application). I am developing in linux and deploying on windows, so
> the best cross-platform compatable/stable pls. (I have noticed some
> problems using gtkDialog->hide() in windows, anyone have the same
> problems. Ill try to sort out some simple test code if i can repeat it
> again). I dont need the code - just best way to do it.
>
> 2. I would like it so the dialog cant be closed using the X in the
> window, I am hiding and showing different forms and dont want them to be
> distroyed, just hidden when they click on the ok or cancel buttons.
Intercept the windows 'delete_event', call your custom
function which hides the widget and make sure you return
'true' in your function.
--
Please always Cc to me when replying to me on the lists.
GnuPG Key: http://guru.josefine.at/~mfischer/C2272BD0.asc