Label does not trigger mouse event

前端 未结 2 722
野性不改
野性不改 2021-01-21 06:00

In the pygtk reference it states that every Gtk.Widget has the event enter-event-notify, but with my test code that event is never fired for the Label widget (with

2条回答
  •  悲&欢浪女
    2021-01-21 06:41

    There are certain widgets that don't own a X-window of their own for performance reasons ,since they are mostly decorative an generally don't need to handle X event signals. You can find a complete list here.

    In those cases, a GtkEventBox is recommended to wrap the windowless widget with(the EventBox was build with that objective specifically).

提交回复
热议问题