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

Re: scrolled window / viewport question



Il dom, 2002-03-31 alle 22:07, Slyder ha scritto:
> Ok so I've got this scrolled window. If I wanna stick a widget that
> does its own scrolling, I can just do a gtk_container_add. If it
> doesnt, I should do a gtk_scrolled_window_add_with_viewport (or
> give it a viewport, but same difference). My question - is there
> a way programmatically look at the widget and know which to do? The
> widget going in is coming from a plugin, so I (in theory) dont know
> which it is.

it should be something like this :

if (GTK_WIDGET_GET_CLASS (widget)->set_scroll_adjustments_signal !=
NULL)
	gtk_container_add (scrolled_window, widget);
else
	gtk_scrolled_window_add_with_viewport (scrolled_window, widget);


Regards,

	Paolo.




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