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



Markus Minihold wrote:
> 
> 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
> 

I use dialogbox too.
And this is what I do before call to gtk_widget_show():

GtkWidget *window = gtk_window_new(GTK_WINDOW_DIALOG);

//position the window at the center of the screen
gtk_window_position( GTK_WINDOW(window), GTK_WIN_POS_CENTER); 
//put it on the top of the X windows stack
gtk_widget_grab_focus(window);
gtk_widget_grab_add(window);
gtk_widget_show(window);
gtk_main();

Hope this work for you.
C-ya
-- 
~~~~~~~~~~~~~~~~~~
Oliver Schulze L.
oliver@pla.net.py
Asuncion-Paraguay
~~~~~~~~~~~~~~~~~~X



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