Re: Gtk::HPaned size and divider



On Sun, 2005-04-17 at 00:27 +0100, Chris Vine wrote:
> On Saturday 16 April 2005 17:41, Matthias Kaeppler wrote:
> 
> > The way presented here doesn't work. I have also written several mails
> > with Vladislav.
> > His "solution" was to:
> >
> > signal_size_allocate().connect( sigc::mem_fun( *this,
> > &ApplicationWindow::on_hpane_geometry_changed ) );
> >
> > The problem is, if I set the position in the allocation signal handler,
> > the signal is emitted again and I'm in an endless loop so to say
> > (program hangs).
> >
> > Any other ideas?
> 
> Yes, you are right, it would cause a loop.  Does it work if you connect to 
> signal_realized()?  If that doesn't work try signal_style_changed() (that is 
> always called when a widget is first shown).

You can stop the loop by setting, and checking, a boolean member
variable or static local variable.

-- 
Murray Cumming
murrayc murrayc com
www.murrayc.com
www.openismus.com




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