Re: Adding a horizontal scrollbar to a TreeView



В Чтв, 27/03/2008 в 00:05 +0100, Andreas Volz пишет:
> Hello,
> 
> I try to add a horizontal scrollbar to a TreeView. It should only
> display if the space is not sufficient. I tried it with:
> 
>   Gtk::TreeView m_siteTreeView;
> ...
>   Gtk::Adjustment hadjustment (0, 0, 100);
>   m_siteTreeView.set_hadjustment (hadjustment);
>   
>   //Add Tree model to container
>   pack_start (m_siteTreeView);
> ...
> 
> But it doesn't work. I see no scroll bar. Any ideas how to do it?

I dunno if latest TreeView supports scrollbars itself, but in my
applications I am just adding TreeView widget into ScrolledWindow. So,
you may configure scrollbars with set_policy() call from ScrolledWindow
widget.

-andrew




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