gtk.EventBoxa widget used to catch events for widgets which do not have
their own window.Synopsisgtk.EventBoxgtk.Bingtk.EventBoxget_visible_windowset_visible_windowvisible_windowget_above_childset_above_childabove_childAncestry+-- gobject.GObject
+-- gtk.Object
+-- gtk.Widget
+-- gtk.Container
+-- gtk.Bin
+-- gtk.EventBox
Implemented Interfacesgtk.EventBox
implements
gtk.Buildablegtk.EventBox Propertiesgtk.Object Propertiesgtk.Widget Propertiesgtk.Container Properties
"above-child"Read-WriteIf True, the event-trapping window
of the eventbox is above the window of the child widget as
opposed to below it. Available in GTK+ 2.4 and above."visible-window"Read-WriteIf True, the event box is visible,
as opposed to invisible and only used to trap
events. Available in GTK+ 2.4 and above.
gtk.EventBox Style Propertiesgtk.Widget Style Propertiesgtk.EventBox Signal Prototypesgobject.GObject Signal Prototypesgtk.Object Signal Prototypesgtk.Widget Signal Prototypesgtk.Container Signal PrototypesDescriptionThe gtk.EventBox
widget is an invisible container widget that provides a window for widgets
that do not have their own window. In GTK, widgets must have a window to be
able to receive event signals. Those widgets that are "windowless" can use a
gtk.EventBox
to receive event signals.Constructorgtk.EventBoxReturns :an eventbox widgetCreates a new gtk.EventBox
widget.Methodsgtk.EventBox.get_visible_windowget_visible_windowReturns :True if the event box window is
visible.This method is available in PyGTK 2.4 and above.The gtk_visible_window() method returns
True if the event box has a visible window. See the set_visible_window() method
for details.gtk.EventBox.set_visible_windowset_visible_windowvisible_windowvisible_window :if True the event box window is
visible.This method is available in PyGTK 2.4 and above.The set_visible_window() method sets
whether the event box uses a visible or invisible child window according to
the value specified by visible_window. If
visible_window is True the event
box uses a visible child window; otherwise, an invisible child window. The
default is to use visible windows.In an invisible window event box, the window that that the event
box creates is a gtk.gdk.INPUT_ONLY window, that is
invisible and only serves to receive events. A visible window event box
creates a visible (gtk.gdk.INPUT_OUTPUT) window that acts
as the parent window for all the widgets contained in the event box.You should generally make your event box invisible if you just
want to trap events. Creating a visible window may cause artifacts that are
visible to the user, especially if the user is using a theme with gradients
or pixmaps. The main reason to create a non input-only event box is if you
want to set the background to a different color or draw on it.There is one unexpected issue for an invisible event box that
has its window below the child. (See the set_above_child()
method.) Since the input-only window is not an ancestor window of any
windows that descendant widgets of the event box create, events on these
windows aren't propagated up by the windowing system, but only by GTK+. The
practical effect of this is if an event isn't in the event mask for the
descendant window (see the gtk.Widget.add_events()
method), it won't be received by the event box. This problem doesn't occur for visible event boxes, because
the event box window is actually the ancestor of the descendant windows, not
just at the same place on the screen.gtk.EventBox.get_above_childget_above_childReturns :True if the event box window is
above the window of its child.This method is available in PyGTK 2.4 and above.The get_above_child() method returns
the value of the "above-child" property that indicates whether the event box
window is above or below the windows of its child. See the set_above_child()
method for details.gtk.EventBox.set_above_childset_above_childabove_childabove_child :if True the event box window is
above the windows of its childThis method is available in PyGTK 2.4 and above.The set_above_child() method sets the
"above-child" property to the value of
above_child. If above_child is
True, the event box window is positioned above the
windows of its child; otherwise, below it. If the window is above, all
events inside the event box will go to the event box. If the window is
below, events in windows of child widgets will first got to that widget, and
then to its parents. The default is to keep the window below the child.