On Sat, Jul 24, 2010 at 3:07 AM, Zach Bean <[email protected]> wrote:

>
> Hi all,
>
> Pardon my ignorance, but is there any way in Gtk# to get notified when an
> one of an object's GLib properties gets changed?  In other languages, I'd
> connect to GObject's notify::<property> signal, but there doesn't seem to
> be
> a corresponding event exposed in Gtk#.
>
> Specifically, I want to be notified when any one of 3 Gtk.Expanders (packed
> in a Gtk.VBox) gets opened or closed.  The point of the exercise is to try
> to make expanders take up as little space as possible when they're in the
> "not expanded" state, but allow them to take as much space as possible when
> they're "expanded".
>
> My plan was to listen for the "expanded" property to change, then use
> vbox.SetChildPacking() to change the "expand" flag accordingly.  There may
> well be a better (or just different) way of doing this, but neither my
> tired
> brain nor Google seem to have turned up much.
>
> Much appreciated,
> Zach Bean


Hi Zach,

You can listen to the Activated property on Gtk.Expander and then check the
Expanded property to figure out if it's open or closed.

--Bojan
_______________________________________________
Gtk-sharp-list maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/gtk-sharp-list

Reply via email to