Re: Gtk::HPaned size and divider



On Tue, 2005-04-12 at 17:47, Matthias Kaeppler wrote:
> Hi,
> 
> I want to set the position of the divider in a pane to always be 
> centered. So I tried the obvious:
> 
> pane.set_position( pane.get_width() / 2 );
> 
> Problem is, get_width() always returns 1.
> I also tried to resize the pane with set_size_request() but that didn't 
> have any effect.
> 
> Am I missing something?

pane.signal_value_changed ().connect (
             mem_fun (*foobar, &FooBar::geom_changed_cb));

void FooBar::geom_change_cb ()
{
 	pane.set_position( pane.get_width() / 2 );
}

-- 
_____________________________________________________________
Vladislav Grinchenko       http://home.comcast.net/~3rdshift/
                                 e-mail: 3rdshift comcast net
                                                   
      Focus on quality, and productivity will follow.
_____________________________________________________________




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