PyGTK Arrow Class - PyGTK

What is PyGTK Arrow Class?

The gtk.Arrow object is used to draw simple arrow pointing towards four cardinal directions. This class is inherited from the gtk.Misc class and the object will inhabit any space owed it, for example, a Label or Button widget.

Characteristically, Arrow object is created using the resulting constructor –

The predefined arrow_type constants are −

  • gtk.ARROW_UP
  • gtk.ARROW_DOWN
  • gtk.ARROW_LEFT
  • gtk.ARROW_RIGHT

The predefined shadow_type constants are listed in the resulting table −

gtk.SHADOW_NONE

No outline.

gtk.SHADOW_IN

The outline is beveled inward.

gtk.SHADOW_OUT

The outline is beveled outward like a button.

gtk.SHADOW_ETCHED_IN

The outline itself is an inward bevel, but the frame bevels outward.

gtk.SHADOW_ETCHED_OUT

The outline is an outward bevel, frame bevels inward.

Example

In the resulting instance, four Button widgets are added to an Hbox. On top of each button, a gtk.Arrow object pointing UP, DOWN, LEFT and RIGHT respectively is placed. The HBOX container is placed at the bottom of the toplevel window with the help of an Alignment container.
Observe the code –

The above code will make the resulting output –

arrow_demo

All rights reserved © 2018 Wisdom IT Services India Pvt. Ltd DMCA.com Protection Status

PyGTK Topics