How to create a scrolled TreeView?



Hi,

is there a way to make a TreeView have scrollbars without wrapping it in a Gtk::ScrolledWindow?

The problem is, my widget is supposed to behave exactly like a treeview (well, except that it's supposed to be scrollable and not resize itself to fit its content), and not like a window. If I derive from ScrolledWindow, I would have to delegate tons of signals, because there is no visible space between the treeview and the scrolled window, and thus all clicks and other actions always happen in the context of the treeview, but the client only has access to the embedding window.

This is especially problematic for drag and drop, because the dnd signals are fired by the treeview, and not the window comprising it, so getting a pointer to the desired widget by downcasting from the drag context (get_source_window()) always fails.

Because of these reasons, I don't want to derive from ScrolledWindow, but directly from TreeView. Is it still possible to get scrollbars?

Thanks,
Matthias




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