Re: [gtk-list] Modal Dialog Box



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



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