TreeView doesn't resize down

Hi all.

I've always used Gtk2::GladeXML to construct my treeviews. Now I'm trying adding a treeview in code:

if ( $self->{vbox} ) {
   my $sw = Gtk2::ScrolledWindow->new;
   $sw->set_policy( "automatic", "automatic" );
   $self->{vbox}->pack_start( $sw, TRUE, TRUE, 0 );
   $self->{treeview} = Gtk2::TreeView->new;
   $self->{treeview}->set_rules_hint( TRUE );
   $sw->add_with_viewport( $self->{treeview} );

Now, I also have some code attached to the size_allocate signal of the treeview that resizes all the columns when the treeview is resized. This works for resizing up & down with treeviews that are in my glade xml file. It also works for treeviews as constructed above when I *increase* the size of the window, but when I decrease the size of the window, the treeview doesn't shrink. Why not / how do I make it?

Daniel Kasak
IT Developer
NUS Consulting Group
Level 5, 77 Pacific Highway
North Sydney, NSW, Australia 2060
T: (+61) 2 9922-7676 / F: (+61) 2 9922 7989
email: dkasak nusconsulting com au

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