Re: Could GtkLayout be contained within GtkLayout??



"driverking" <driverking pchome com tw> writes:

Is it possible to make outer GtkLayout contained within inner
GtkLayout widget?  I need a container widget which is like the Panel
component in Java.  This container widget can contain another
container widget provided with its location coordinate with respect
to its parent container.


Yeah this probably works. If you aren't putting a GtkLayout in a
scrolled window though, you may as well use GtkFixed.

Another question, is there any widget similar to the motif
DrawingArea?  The motif DrawingArea can be both a canvas and a
container, but the GtkDrawingArea seems to be a pure canvas. If GTK+
doesn't support this widget, how can I write a widget with such
feature?


GtkLayout is both a canvas and a drawing area. The only trick is that
you have to draw to layout->bin_window, and keep scrolling in mind
(layout->xoffset, layout->yoffset) if you care about scrolling.

Havoc




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