Re: [gtk-list] Re: Modal Dialog Box



Thanks a lot for your tip. The event loop now is captured by the dialog box
and you have to answer it. But what I'm missing is that a modal dialog box
stays always on top of the application window. I have now the affect that the
dialog box has to be anwered and that I can activate the parent window, which
overlaps the dialog box. Is there any functions which prevents this - e.g.
stay on top of application.

Markus

Karsten Schulz wrote:

> On Sun, 24 May 1998, Markus Minihold wrote:
>
> > how can I implement a modal dialog box with gtk+ which is activated from
> > a menu entry?
>
> Just to give you a start point:
>
>    dlgwin = gtk_dialog_new();
>    ...       /* set title and position a.s.o */
>    gtk_grab_add( dlgwin ); /* make dlgwindow modal to your application */
>    gtk_widget_realize( dlgwin );
>    ...
>
> And in the callback, which closes your dialog box:
>
>    ...
>    gtk_grab_remove( dlgwindow );
>    gtk_widget_destroy( dlgwindow );
>    ...
>
> Hope, this helps!
>
> Regards
> Karsten
>
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]