开发者

Click on gtk.Expander custom label-widget doesn't work

I'm triying to put dinamically several gtk.Expander inside a gtk.VBox and have a custom widget-label with a gtk.HBox with a gtk.Label and a gtk.Button/gtk.Image inside it to have a delete button, something similar to some list widgets found on MacOS X, for example开发者_JAVA百科 at Automator (image). Look the close button at the right of the title bar of the expanders: that's just exactly what i would like to have.

The problem is that when i click on the delete gtk.Button/gtk.Image, the expander gets closed or opened, instead of the gtk.Button click/gtk.Image event-notify-release callback being called, so the event is being captured by the gtk.Expander.

I have opened a new question since this problem is similar to the one from Right-Click on a PyGTK Hbox in an Expander but there they didn't found a solution, and also because a better solution would be to find a specific widget for that task (if exists) instead to hack with the expander... :-D


I would suggest creating your own custom widget, perhaps inheriting from Expander. Here is a tutorial on subclassing widgets in PyGTK.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜