Re: how can I get the container of a Widget




Jiang XU <jiang.xu@echostar.com> writes:

> How I can get the container of the Widget.
> 
> Suppose I added a GtkList to a scrolled window, which is the container.
> How can I get that scroll window from the GtkList???

Well, in this case the immediate parent of the GtkList is a GtkViewport
widget (since you used gtk_scrolled_window_add_with_viewport()),
and the ScrolledWindow is the parent of the Viewport.

So the GtkScrolledWindow can be accessed as:

 list->parent->parent

Regards,
                                        Owen



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