Re: Gtk_Paned position and signals



On 15/02/2008, Andrew Sage <belathus gmail com> wrote:
When the position of a VPaned or HPaned object is changed (IE, via
 clicking and dragging with the mouse) is a signal emitted?  If so, which
 one?  I've been playing with signals for a while now like the
 'move-handle' signal, the 'configure-event' signal, and the 'drag-end'
 signal with none matching the desired result.  Basically, what I want to
 do is remember the position of the Paned widget after the position is
 changed so that when that window is opened again (after being
 destroyed), the positions remain identical.  Thanks!

Look for notify on the "position" property:

        g_signal_connect( pane, "notify::position",
                G_CALLBACK( pane_notify_position_cb ), NULL );

Took me ages to work this out as well :-( Here's a widget that wraps
up a pane as a side panel that can slide in and out:

http://vips.svn.sourceforge.net/viewvc/vips/nip2/trunk/src/pane.c?revision=121&view=markup

It remembers the position, has a simple hide/reveal animation, and
knows whether it's currently open or closed.

John



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