GNOME Bugzilla – Bug 318169
Hbox w/ buttons as GtkExpander label does not work properly
Last modified: 2017-08-24 20:59:00 UTC
Please describe the problem: I have a GtkExpander and I set its label widget to an hbox to which I added a label and 2 buttons. They all display nicely, but the buttons don't work properly. When I click on them it activates the expander instead of the buttons themselves. Actually, a couple of the button's top and bottom rows of pixles will respond to mouse clicks, but none of the center area does. After asking on the gtk+ app developers mailing list I got a work-around. If the expander is realized before the buttons get added then it works properly. The thread is archived here: <http://news.gmane.org/find-root.php?message_id=%3cloom.20050925T114109%2d11%40post.gmane.org%3e> Steps to reproduce: Actual results: Expected results: Does this happen every time? Yes. Other information: I have a short sample program that recreates the problem. I will attach it here.
Created attachment 53161 [details] Test case. Buttons don't work.
Could be a problem with z ordering of sibling windows. But I think the idea of putting something clickable in the expander label is semi-broken, because the label is the thing you are supposed to click on to toggle the expander.
I think that the expander should allow putting anything in the label place. For instance, if you want to make an expandable informative area that can also be closed. Then you would put a close button next to the label. What reminds me that there is a problem with that too: It is impossible to ask the widget in the label place to expand/fill, so if you put there an HBox and want the left side to have a label and the far-right side to have a small button, well, that's impossible :-/ Itai.
See https://bugzilla.gnome.org/show_bug.cgi?id=151537
As per this dupe, being able to receive clicks in the label_widget of a GtkExpander is still considered WONTFIX. *** This bug has been marked as a duplicate of bug 151537 ***