On Sun, Aug 3, 2008 at 2:01 AM, Mark A. Nicolosi <[EMAIL PROTECTED]> wrote: > I'm trying to make an application have a bar similar to the one in Nautilus > when you visit the trash location. I've got it to work by changing the > background in OnRealized() of my widget: > > protected override void OnRealized () > { > base.ModifyBg (StateType.Normal, base.Style.Background > (StateType.Selected)); > base.OnRealized (); > } > > Now the problem is, I want it to change when the theme changes like the rest > of Gnome. I can't call base.ModifyBg() in OnStyleSet(), it crashes the > program (I think Gtk+ gets in an infinite loop). > > Anyone have any ideas?
You should be calling base.OnRealized() first. Unless you are trying to prevent the parent class from doing what it needs to do on realization for some reason. I'm not sure this will fix the problem you have described but it is a glaring error to omit this call. -- Chris Howie http://www.chrishowie.com http://en.wikipedia.org/wiki/User:Crazycomputers _______________________________________________ Gtk-sharp-list maillist - Gtk-sharp-list@lists.ximian.com http://lists.ximian.com/mailman/listinfo/gtk-sharp-list