Re: how to create "client area" widget?



Ivan Popivanov wrote:

I guess this question has been asked many times here:-), but I was unable to find anything in the archives. So, what's the way to create say a DrawingArea widget that covers the client area of the main window, and have the DrawingArea resize automatically?

The way is to create GtkDrawingArea widget and simply pack it inside GtkWindow container via gtk_container_add. The window will auto resize area when needed.

What will happen if there are toolbars, menus etc? Does GTK automatically adjust the size and the position of the client area window, or the application has to take care for that?

GTK will do it for you in almost all cases. Please read:
http://www.gtk.org/tutorial/ch-packingwidgets.html

   Olexiy





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