Re: Sensitive child in insensitive parent?
- From: Christoph Schmeding <cschmeding altair com>
- To: Larry Reaves <larry yrral net>, gtk-app-devel-list gnome org
- Subject: Re: Sensitive child in insensitive parent?
- Date: Wed, 08 Apr 2009 11:05:32 +0200
Hello,
Thanks for the answer.
Indeed this is a solution.
But imagine an application with lots of containers packed into one
another, and I want to have everything insensitive except one or two
little parts of it.
This means that I recursively have to loop through all levels of
containers and set them one by one to sensitive or insensitive respectively.
I was hoping Gtk could somehow do this for me! Isn't there a way?
Thanks,
Christoph
Larry Reaves wrote:
On Tue, 2009-04-07 at 16:39 +0200, Christoph Schmeding wrote:
Hello,
I have a "child" widget, which is packed together with a lot of
"siblings" into a "parent" container.
Now I want to set the parent with all the siblings insensitive, but
keeping my "special child" sensitive.
Calling
gtk_widget_set_sensitive(parent, FALSE);
gtk_widget_set_sensitive(child, TRUE);
does not work. I have searched a bit, and it seems even wanted behaviour
that a child can only be sensitive if all its parents are sensitive, too.
Of course I can myself set each sibling insensitive, instead of the
parent. But this is quite annoying, especially if I want to do this in a
multi-level packaging, i.e. if the parent should be insensitive and only
a child of a child (of a child ...) should be sensitive.
Does anybody know how to do this easily?
look at gtk_container_get_children() and loop over the list
-Larry
<larry yrral net>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]